Skip to content

Commit b7e51d9

Browse files
committed
Don't allow relminmxid to go backwards during VACUUM FULL
We were allowing a table's pg_class.relminmxid value to move backwards when heaps were swapped by VACUUM FULL or CLUSTER. There is a similar protection against relfrozenxid going backwards, which we neglected to clone when the multixact stuff was rejiggered by commit 0ac5ad5. Backpatch to 9.3, where relminmxid was introduced. As reported by Heikki in http://www.postgresql.org/message-id/52401AEA.9000608@vmware.com
1 parent b277057 commit b7e51d9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/backend/commands/cluster.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,12 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex, bool verbose,
861861
if (TransactionIdPrecedes(FreezeXid, OldHeap->rd_rel->relfrozenxid))
862862
FreezeXid = OldHeap->rd_rel->relfrozenxid;
863863

864+
/*
865+
* MultiXactCutoff, similarly, shouldn't go backwards either.
866+
*/
867+
if (MultiXactIdPrecedes(MultiXactCutoff, OldHeap->rd_rel->relminmxid))
868+
MultiXactCutoff = OldHeap->rd_rel->relminmxid;
869+
864870
/* return selected values to caller */
865871
*pFreezeXid = FreezeXid;
866872
*pCutoffMulti = MultiXactCutoff;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy