Skip to content

Commit 8caf9fe

Browse files
committed
Fix typo in ReorderBufferIterTXNInit().
This looks like it would cause changes from subtransactions to be missed by the iterator being constructed, if those changes had been spilled to disk previously. This implies that large subtransactions might be lost (in whole or in part) by logical replication. Found and fixed by Petru-Florin Mihancea, per bug #14208. Report: <20160622144830.5791.22512@wrigleys.postgresql.org>
1 parent 1651b9a commit 8caf9fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/replication/logical/reorderbuffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ ReorderBufferIterTXNInit(ReorderBuffer *rb, ReorderBufferTXN *txn)
897897
{
898898
ReorderBufferChange *cur_change;
899899

900-
if (txn->nentries != txn->nentries_mem)
900+
if (cur_txn->nentries != cur_txn->nentries_mem)
901901
ReorderBufferRestoreChanges(rb, cur_txn,
902902
&state->entries[off].fd,
903903
&state->entries[off].segno);

0 commit comments

Comments
 (0)