Re: Updated version of pg_receivexlog

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Updated version of pg_receivexlog
Дата
Msg-id CABUevEziv=ejN1XmQM6EWuc_4q=30dUZu2=PJtkajgfxQVF8yQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Updated version of pg_receivexlog  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Updated version of pg_receivexlog
Список pgsql-hackers
On Thu, Oct 27, 2011 at 16:54, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Magnus Hagander <magnus@hagander.net> writes:
>> On Thu, Oct 27, 2011 at 13:19, Heikki Linnakangas
>> <heikki.linnakangas@enterprisedb.com> wrote:
>>> On 27.10.2011 14:09, Fujii Masao wrote:
>>>> Yes. But that sounds unuserfriendly. Padding the WAL file manually
>>>> is easy-to-do for a user?
>
>> I'd definitely want to avoid anything that requires pg_receivexlog to
>> actually *parse* the WAL. That'll make it way more complex than I'd
>> like.
>
> What parsing?  Just pad to 16MB with zeroes.  In fact, I think the

I'm just sayihng that *if* parsing is required, it would be bad.

> receiver should just create the file that size to start with, and then
> write received data into it, much like normal WAL creation does.

So when pg_receivexlog starts up, how would it know if the last file
represents a completed file, or a half-full file, without actually
parsing it? It could be a 16Mb file with 10 bytes of valid data, or a
complete file with 16Mb of valid data.

We could always ask for a retransmit of the whole file, but if that
file is gone on the master, we won't be able to do that, and will
error out in a situation that's not actually an error.

Though I guess if we leave the file as .partial up until this point
(per my other patch just posted), I guess this doesn't actually apply
- if the file is called .partial, we'll overwrite into it. If it's
not, then we assume it's a complete segment.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Updated version of pg_receivexlog
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Updated version of pg_receivexlog