Skip to content

Commit d5a7bd5

Browse files
committed
Fix variable reference in comment
This used to say "nsubxcnt isn't decreased when subtransactions abort", but there's no variable called nsubxcnt. Commit 8548ddc changed it to "subxcnt", among other typo fixes, but that was wrong too: the comment actually talks about txn->nsubtxns. That's the field that's incremented but never decremented and is used for the allocation earlier in the function.
1 parent 94bb6c4 commit d5a7bd5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/replication/logical/reorderbuffer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1861,9 +1861,9 @@ ReorderBufferCopySnap(ReorderBuffer *rb, Snapshot orig_snap,
18611861
snap->subxip[i++] = txn->xid;
18621862

18631863
/*
1864-
* subxcnt isn't decreased when subtransactions abort, so count manually.
1865-
* Since it's an upper boundary it is safe to use it for the allocation
1866-
* above.
1864+
* txn->nsubtxns isn't decreased when subtransactions abort, so count
1865+
* manually. Since it's an upper boundary it is safe to use it for the
1866+
* allocation above.
18671867
*/
18681868
snap->subxcnt = 1;
18691869

0 commit comments

Comments
 (0)