mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
Use standard die() signal handler in walreceiver
This gets rid of the bespoken ProcessWalRcvInterrupts() function,
which lets walreceiver terminate at any CHECK_FOR_INTERRUPTS() call.
And it's less code anyway.
We can now use the standard libpqsrv_connect_params() libpq wrapper
from libpq-be-fe-helpers.h, removing more code. We attempted to do
that earlier already in commit 728f86fec6, but that was reverted
because it didn't call ProcessWalRcvInterrupts() and therefore didn't
react to shutdown requests. Now that ProcessWalRcvInterrupts() is
gone, it works. As stated in that commit, this also leads to
libpqwalreceiver reserving file descriptors for libpq conncetions,
which is nice.
Author: Andres Freund <andres@anarazel.de> (the earlier commit)
Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Yura Sokolov <y.sokolov@postgrespro.ru>
This commit is contained in:
@@ -487,7 +487,6 @@ walrcv_clear_result(WalRcvExecResult *walres)
|
||||
|
||||
/* prototypes for functions in walreceiver.c */
|
||||
pg_noreturn extern void WalReceiverMain(const void *startup_data, size_t startup_data_len);
|
||||
extern void ProcessWalRcvInterrupts(void);
|
||||
extern void WalRcvForceReply(void);
|
||||
|
||||
/* prototypes for functions in walreceiverfuncs.c */
|
||||
|
||||
Reference in New Issue
Block a user