Re: pg_receivexlog add synchronous mode

Поиск
Список
Период
Сортировка
От
Тема Re: pg_receivexlog add synchronous mode
Дата
Msg-id A9C510524E235E44AE909CD4027AE196BAAA06D7E6@MBX-MSG-SV03.msg.nttdata.co.jp
обсуждение исходный текст
Ответ на Re: pg_receivexlog add synchronous mode  (Fujii Masao <masao.fujii@gmail.com>)
Ответы Re: pg_receivexlog add synchronous mode
Список pgsql-hackers
> 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.

I was not able to understand movement of walreceiver well.
While walreceiver writes data, do PQconsumeInput() by omitting the select().
Do flush if the PQgetCopyData has been to return the zero continuously.
Fixed to the same process using the flag.

Regards,

-- 
Furuya Osamu


Вложения

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

Предыдущее
От: b8flowerfire
Дата:
Сообщение: Re: why postgresql define NTUP_PER_BUCKET as 10, not other numbers smaller
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: "RETURNING PRIMARY KEY" syntax extension