aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/replication/logical/reorderbuffer.c2
-rw-r--r--src/backend/replication/logical/worker.c9
2 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index 941ca9afe49..c1def5ca3f9 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -1331,7 +1331,7 @@ ReorderBufferBuildTupleCidHash(ReorderBuffer *rb, ReorderBufferTXN *txn)
ent = (ReorderBufferTupleCidEnt *)
hash_search(txn->tuplecid_hash,
(void *) &key,
- HASH_ENTER | HASH_FIND,
+ HASH_ENTER,
&found);
if (!found)
{
diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c
index f6650a2ee92..571b0e717e1 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -501,7 +501,14 @@ apply_handle_commit(StringInfo s)
logicalrep_read_commit(s, &commit_data);
- Assert(commit_data.commit_lsn == remote_final_lsn);
+ if (commit_data.commit_lsn != remote_final_lsn)
+ ereport(ERROR,
+ (errcode(ERRCODE_PROTOCOL_VIOLATION),
+ errmsg_internal("incorrect commit LSN %X/%X in commit message (expected %X/%X)",
+ (uint32) (commit_data.commit_lsn >> 32),
+ (uint32) commit_data.commit_lsn,
+ (uint32) (remote_final_lsn >> 32),
+ (uint32) remote_final_lsn)));
/* The synchronization worker runs in single transaction. */
if (IsTransactionState() && !am_tablesync_worker())