diff options
author | Andres Freund <andres@anarazel.de> | 2023-03-11 14:12:51 -0800 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2023-03-11 14:14:50 -0800 |
commit | 6d9588108a5644800b0047ccb666f70373164f68 (patch) | |
tree | d2bae8ec95efda2f91d3d9076a8016b003d396a3 /src/backend/executor/nodeModifyTable.c | |
parent | 6170386c7fc1c1cfd7c2a655b8107872d18a0193 (diff) | |
download | postgresql-6d9588108a5644800b0047ccb666f70373164f68.tar.gz postgresql-6d9588108a5644800b0047ccb666f70373164f68.zip |
amcheck: Fix ordering bug in update_cached_xid_range()
The initialization order in update_cached_xid_range() was wrong, calling
FullTransactionIdFromXidAndCtx() before setting
->next_xid. FullTransactionIdFromXidAndCtx() uses ->next_xid.
In most situations this will not cause visible issues, because the next call
to update_cached_xid_range() will use a less wrong ->next_xid. It's rare that
xids advance fast enough for this to be a problem.
Found while adding more asserts to the 64bit xid infrastructure.
Reviewed-by: Mark Dilger <mark.dilger@enterprisedb.com>
Discussion: https://postgr.es/m/20230108002923.cyoser3ttmt63bfn@awork3.anarazel.de
Backpatch: 14-, where heapam verification was introduced
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
0 files changed, 0 insertions, 0 deletions