Re: pg_receivexlog add synchronous mode

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: pg_receivexlog add synchronous mode
Дата
Msg-id CAHGQGwH2_s+YBSdqCq1p82ZTiPTxktFTDp_baD0H0eRo44FTcg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_receivexlog add synchronous mode  (<furuyao@pm.nttdata.co.jp>)
Ответы Re: pg_receivexlog add synchronous mode
Список pgsql-hackers
On Fri, Jun 6, 2014 at 8:05 PM,  <furuyao@pm.nttdata.co.jp> wrote:
>> -----Original Message-----
>> > > Flush is not performed every time write, it is performed
>> > > collectively like walrecever.
>> >
>> > I only glanced at this, but afaics you're only flushing at the end
>> > every WAL segment. That will result in absolutely horrible performance,
>> right?
>> > Walreceiver does flush more frequently than that. It basically syncs
>> > every chunk of received WAL...
>>
>> IMO the completion of the write loop was completion of received WAL.
>> And Walreceiver same.
>>
>> I confirm it about the flush position.
> As you say,Walreceiver does flush more frequently than that.

No. IIUC walreceiver does flush *less* frequently than what you implemented
on pg_receivexlog. Your version of pg_receivexlog tries to do flush every time
when it receives one WAL chunk. OTOH, walreceiver does flush only when
there is no extra WAL chunk in receive buffer. IOW, after writing WAL chunk,
if there is another WAL chunk that walreceiver can receive immediately, it
postpones flush later.

> However, it seems difficult to apply as same way.

Why? ISTM that's not so difficult.

Regards,

-- 
Fujii Masao



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

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: Why is it "JSQuery"?
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Re: popen and pclose redefinitions causing many warning in Windows build