mirror of
https://github.com/postgres/postgres.git
synced 2025-06-25 01:02:05 +03:00
Support configuration reload in logical replication workers
Author: Michael Paquier <michael.paquier@gmail.com> Reviewed-by: Petr Jelinek <petr.jelinek@2ndquadrant.com> Reported-by: Fujii Masao <masao.fujii@gmail.com>
This commit is contained in:
@ -1138,6 +1138,12 @@ LogicalRepApplyLoop(XLogRecPtr last_received)
|
||||
if (rc & WL_POSTMASTER_DEATH)
|
||||
proc_exit(1);
|
||||
|
||||
if (got_SIGHUP)
|
||||
{
|
||||
got_SIGHUP = false;
|
||||
ProcessConfigFile(PGC_SIGHUP);
|
||||
}
|
||||
|
||||
if (rc & WL_TIMEOUT)
|
||||
{
|
||||
/*
|
||||
@ -1441,6 +1447,7 @@ ApplyWorkerMain(Datum main_arg)
|
||||
logicalrep_worker_attach(worker_slot);
|
||||
|
||||
/* Setup signal handling */
|
||||
pqsignal(SIGHUP, logicalrep_worker_sighup);
|
||||
pqsignal(SIGTERM, logicalrep_worker_sigterm);
|
||||
BackgroundWorkerUnblockSignals();
|
||||
|
||||
|
Reference in New Issue
Block a user