mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Use the regular main processing loop also in walsenders.
The regular backend's main loop handles signal handling and error recovery better than the current WAL sender command loop does. For example, if the client hangs and a SIGTERM is received before starting streaming, the walsender will now terminate immediately, rather than hang until the connection times out.
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
/* global state */
|
||||
extern bool am_walsender;
|
||||
extern bool am_cascading_walsender;
|
||||
extern volatile sig_atomic_t walsender_shutdown_requested;
|
||||
extern volatile sig_atomic_t walsender_ready_to_stop;
|
||||
extern bool wake_wal_senders;
|
||||
|
||||
@@ -27,7 +26,9 @@ extern bool wake_wal_senders;
|
||||
extern int max_wal_senders;
|
||||
extern int replication_timeout;
|
||||
|
||||
extern void WalSenderMain(void) __attribute__((noreturn));
|
||||
extern void InitWalSender(void);
|
||||
extern void exec_replication_command(const char *query_string);
|
||||
extern void WalSndErrorCleanup(void);
|
||||
extern void WalSndSignals(void);
|
||||
extern Size WalSndShmemSize(void);
|
||||
extern void WalSndShmemInit(void);
|
||||
|
Reference in New Issue
Block a user