1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-29 16:21:20 +03:00

Fix variable reference in comment

This used to say "nsubxcnt isn't decreased when subtransactions
abort", but there's no variable called nsubxcnt. Commit 8548ddc61b
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.
This commit is contained in:
Heikki Linnakangas 2024-12-20 19:36:33 +02:00
parent 94bb6c4410
commit d5a7bd5670

View File

@ -1861,9 +1861,9 @@ ReorderBufferCopySnap(ReorderBuffer *rb, Snapshot orig_snap,
snap->subxip[i++] = txn->xid;
/*
* subxcnt isn't decreased when subtransactions abort, so count manually.
* Since it's an upper boundary it is safe to use it for the allocation
* above.
* txn->nsubtxns isn't decreased when subtransactions abort, so count
* manually. Since it's an upper boundary it is safe to use it for the
* allocation above.
*/
snap->subxcnt = 1;