aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistutil.c
diff options
context:
space:
mode:
authorMelanie Plageman <melanieplageman@gmail.com>2025-06-02 10:54:07 -0400
committerMelanie Plageman <melanieplageman@gmail.com>2025-06-02 10:54:07 -0400
commit31a7e175fd8f6079555f2bba95c7cc118236bb20 (patch)
tree864dc33d1bb5fb5eb2792853aa9a8a962068132a /src/backend/access/gist/gistutil.c
parentfc32be3c941f9d98dd9f549153a5fcea6c3e9b8b (diff)
downloadpostgresql-31a7e175fd8f6079555f2bba95c7cc118236bb20.tar.gz
postgresql-31a7e175fd8f6079555f2bba95c7cc118236bb20.zip
Correct heap vacuum boundary state setup ordering
052026c9b9 mistakenly reordered setup steps in heap_vacuum_rel(), incorrectly moving RelationGetNumberOfBlocks() before vacuum_get_cutoffs(). OldestXmin must be determined before RelationGetNumberOfBlocks() calculates the number of blocks in the relation that will be vacuumed. Otherwise tuples older than OldestXmin may be inserted into the end of the relation into blocks that are not vacuumed. If additional tuples newer than those inserted into unscanned blocks but older than OldestXmin are inserted into free space earlier in the relation, the result could be advancing pg_class.relfrozenxid to a newer value than an unfrozen XID in one of the unscanned heap pages. Assigning an incorrect relfrozenxid can lead to data loss, so it is imperative that it correctly reflect the oldest unfrozen xid. Reported-by: Peter Geoghegan <pg@bowt.ie> Author: Melanie Plageman <melanieplageman@gmail.com> Reviewed-by: Peter Geoghegan <pg@bowt.ie> Discussion: https://postgr.es/m/CAH2-WzntqvVEdbbpqG5JqSZGuLWmy4PBfUO-OswfivKchr2gvw%40mail.gmail.com
Diffstat (limited to 'src/backend/access/gist/gistutil.c')
0 files changed, 0 insertions, 0 deletions