Skip to content

Commit 9170ffd

Browse files
knizhnikKonstantin Knizhnik
authored andcommitted
Flush logical messages with snapshots and replication origin (#382)
Co-authored-by: Konstantin Knizhnik <knizhnik@neon.tech>
1 parent 585880e commit 9170ffd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/backend/replication/logical/origin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ CheckPointReplicationOrigin(void)
692692
chkp_size += sizeof(crc);
693693

694694
/* NEON specific: persist snapshot in storage using logical message */
695-
LogLogicalMessage("neon-file:pg_logical/replorigin_checkpoint", buf, chkp_size, false);
695+
XLogFlush(LogLogicalMessage("neon-file:pg_logical/replorigin_checkpoint", buf, chkp_size, false));
696696
}
697697
pfree(buf);
698698

src/backend/replication/logical/snapbuild.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,7 +1756,7 @@ SnapBuildSerialize(SnapBuild *builder, XLogRecPtr lsn)
17561756

17571757
/* NEON specific: persist snapshot in storage using logical message */
17581758
snprintf(prefix, sizeof(prefix), "neon-file:%s", path);
1759-
LogLogicalMessage(prefix, (char*)ondisk, needed_length, false);
1759+
XLogFlush(LogLogicalMessage(prefix, (char*)ondisk, needed_length, false));
17601760

17611761
errno = 0;
17621762
pgstat_report_wait_start(WAIT_EVENT_SNAPBUILD_WRITE);
@@ -2122,7 +2122,7 @@ CheckPointSnapBuild(void)
21222122

21232123
/* NEON specific: delete file from storage using logical message */
21242124
snprintf(prefix, sizeof(prefix), "neon-file:%s", path);
2125-
LogLogicalMessage(prefix, NULL, 0, false);
2125+
XLogFlush(LogLogicalMessage(prefix, NULL, 0, false));
21262126

21272127
/*
21282128
* It's not particularly harmful, though strange, if we can't

0 commit comments

Comments
 (0)