diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2024-12-20 19:36:33 +0200 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2024-12-20 19:36:33 +0200 |
commit | d5a7bd5670c4a59bea506f5999101a8e40ef256c (patch) | |
tree | 6d610f4105507e9848607fd05b8e7e538279fb1f | |
parent | 94bb6c4410d81ccc019bb60d8aedb73dbc85df76 (diff) | |
download | postgresql-d5a7bd5670c4a59bea506f5999101a8e40ef256c.tar.gz postgresql-d5a7bd5670c4a59bea506f5999101a8e40ef256c.zip |
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.
-rw-r--r-- | src/backend/replication/logical/reorderbuffer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c index e3a5c7b660c..9313d2b01e1 100644 --- a/src/backend/replication/logical/reorderbuffer.c +++ b/src/backend/replication/logical/reorderbuffer.c @@ -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; |