Skip to content

Commit 1ff0c1c

Browse files
SAITO Masatakakoichi-szk
authored andcommitted
Prevent WAL sender from initializing process as a normal backend.
1 parent 98f2cb7 commit 1ff0c1c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/tcop/postgres.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3982,7 +3982,7 @@ PostgresMain(int argc, char *argv[],
39823982
xc_lockForBackupKey1 = Int32GetDatum(XC_LOCK_FOR_BACKUP_KEY_2);
39833983

39843984
/* If this postmaster is launched from another Coord, do not initialize handles. skip it */
3985-
if (IS_PGXC_COORDINATOR && !IsPoolHandle())
3985+
if (!am_walsender && IS_PGXC_COORDINATOR && !IsPoolHandle())
39863986
{
39873987
CurrentResourceOwner = ResourceOwnerCreate(NULL, "ForPGXCNodes");
39883988

@@ -4007,7 +4007,7 @@ PostgresMain(int argc, char *argv[],
40074007
/* If we exit, first try and clean connections and send to pool */
40084008
on_proc_exit (PGXCNodeCleanAndRelease, 0);
40094009
}
4010-
if (IS_PGXC_DATANODE)
4010+
if (!am_walsender && IS_PGXC_DATANODE)
40114011
{
40124012
/* If we exit, first try and clean connection to GTM */
40134013
on_proc_exit (DataNodeShutdown, 0);

0 commit comments

Comments
 (0)