Skip to content

Commit

Permalink
fix: XLogFlush replication slot drop (#396)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Chi Z <chi@neon.tech>
  • Loading branch information
skyzh committed Mar 28, 2024
1 parent 748643b commit a7b4c66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend/replication/slot.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ ReplicationSlotDropPtr(ReplicationSlot *slot)
char prefix[MAXPGPATH];
snprintf(prefix, sizeof(prefix), "neon-file:%s/state", path);
elog(LOG, "Drop replication slot %s", path);
LogLogicalMessage(prefix, NULL, 0, false);
XLogFlush(LogLogicalMessage(prefix, NULL, 0, false));
}

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

errno = 0;
Expand Down

0 comments on commit a7b4c66

Please sign in to comment.