Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7e93d70

Browse files
committed
call BgwPoolStop on postmaster exit
1 parent a2a686b commit 7e93d70

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pglogical_receiver.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include "multimaster.h"
4444
#include "spill.h"
4545
#include "state.h"
46+
#include "bgwpool.h"
4647

4748
#define ERRCODE_DUPLICATE_OBJECT_STR "42710"
4849
#define RECEIVER_SUSPEND_TIMEOUT (1*USECS_PER_SEC)
@@ -418,7 +419,10 @@ pglogical_receiver_main(Datum main_arg)
418419

419420
/* Emergency bailout if postmaster has died */
420421
if (rc & WL_POSTMASTER_DEATH)
422+
{
423+
BgwPoolStop(&Mtm->pool);
421424
proc_exit(1);
425+
}
422426

423427
if (Mtm->status == MTM_DISABLED || (Mtm->status == MTM_RECOVERY && Mtm->recoverySlot != nodeId))
424428
{

0 commit comments

Comments
 (0)