On Tue, Jun 6, 2017 at 9:47 AM, Andres Freund <and...@anarazel.de> wrote: > On 2017-06-05 15:30:38 +0900, Michael Paquier wrote: >> I think that it would be interesting to be able to >> trigger a feedback message using SIGHUP in WAL receivers, refactoring >> at the same time SIGHUP handling for WAL receivers. It is possible for >> example to abuse SIGHUP in autovacuum for cost parameters. > > Could you clarify a bit here, I can't follow? Do you think it's > actually a good idea to combine that with the largely mechanical patch?
Sort of. The thought here is to be able to trigger XLogWalRcvSendReply() using a SIGHUP, even if force_reply is not enforced. But looking again at the code, XLogWalRcvSendReply() is processed only if data is received so sending multiple times the same message to server would be pointless. Still, don't you think that it would be helpful to wake up the WAL receiver at will on SIGHUP by setting its latch? XLogWalRcvSendHSFeedback() could be triggered at will using that. ProcessWalRcvInterrupts() could include the checks for SIGHUP by the way... -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers