aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-06-30 12:37:02 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-06-30 12:37:02 -0400
commit8caf9fe62544b351d4f6219bf416f5ce08ef3c21 (patch)
treee7d47ee37390a64f45c0477ea35080374e044c49 /src
parent1651b9aa2d97c67ce731173bf78899b1053ecc4a (diff)
downloadpostgresql-8caf9fe62544b351d4f6219bf416f5ce08ef3c21.tar.gz
postgresql-8caf9fe62544b351d4f6219bf416f5ce08ef3c21.zip
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>
Diffstat (limited to 'src')
-rw-r--r--src/backend/replication/logical/reorderbuffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index 1b6aa7b60f2..9b5642a5162 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -897,7 +897,7 @@ ReorderBufferIterTXNInit(ReorderBuffer *rb, ReorderBufferTXN *txn)
{
ReorderBufferChange *cur_change;
- if (txn->nentries != txn->nentries_mem)
+ if (cur_txn->nentries != cur_txn->nentries_mem)
ReorderBufferRestoreChanges(rb, cur_txn,
&state->entries[off].fd,
&state->entries[off].segno);