> 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
-- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers