Skip to content

Commit 43a818e

Browse files
skyzhtristan957
authored andcommitted
fix: XLogFlush replication slot save/drop (#395)
* fix: XLogFlush replication slot drop Signed-off-by: Alex Chi Z <chi@neon.tech> * fix all occurrences Signed-off-by: Alex Chi Z <chi@neon.tech> --------- Signed-off-by: Alex Chi Z <chi@neon.tech>
1 parent 5fc15f6 commit 43a818e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/replication/slot.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ ReplicationSlotDropPtr(ReplicationSlot *slot)
690690
char prefix[MAXPGPATH];
691691
snprintf(prefix, sizeof(prefix), "neon-file:%s/state", path);
692692
elog(LOG, "Drop replication slot %s", path);
693-
LogLogicalMessage(prefix, NULL, 0, false);
693+
XLogFlush(LogLogicalMessage(prefix, NULL, 0, false));
694694
}
695695

696696
/*
@@ -1665,7 +1665,7 @@ SaveSlotToPath(ReplicationSlot *slot, const char *dir, int elevel)
16651665
char prefix[MAXPGPATH];
16661666
snprintf(prefix, sizeof(prefix), "neon-file:%s", path);
16671667
elog(LOG, "Save replication slot at %s restart_lsn=%X/%X", path, LSN_FORMAT_ARGS(cp.slotdata.restart_lsn));
1668-
LogLogicalMessage(prefix, (char*)&cp, sizeof cp, false);
1668+
XLogFlush(LogLogicalMessage(prefix, (char*)&cp, sizeof cp, false));
16691669
}
16701670

16711671
errno = 0;

0 commit comments

Comments
 (0)