Remove GLOBALTABLESPACE_OID assert for locked buffers.
authorNoah Misch <[email protected]>
Sat, 10 May 2025 14:36:27 +0000 (07:36 -0700)
committerNoah Misch <[email protected]>
Sat, 10 May 2025 14:36:27 +0000 (07:36 -0700)
Commit f4ece891fc2f3f96f0571720a1ae30db8030681b added the assertion in
an attempt to catch some defects even after VACUUM FULL or REINDEX.
However, IsCatalogTextUniqueIndexOid(tag.relNumber) always returns false
after a relfilenode change, provoking unintended assertion failures.

Reported-by: Adam Guo <[email protected]>
Reviewed-by: Masahiko Sawada <[email protected]>
Bug: #18912
Discussion: https://postgr.es/m/18912-a41c9bd0e0ad19b1@postgresql.org

src/backend/storage/buffer/bufmgr.c

index 0b317d2d809fb7c8794af3c27b1b24cfb9a16f02..f93131a645ea8bc61215ca48cba77309fcea3278 100644 (file)
@@ -4161,8 +4161,6 @@ AssertNotCatalogBufferLock(LWLock *lock, LWLockMode mode,
        return;
 
    Assert(!IsCatalogRelationOid(relid));
-   /* Shared rels are always catalogs: detect even after VACUUM FULL. */
-   Assert(tag.spcOid != GLOBALTABLESPACE_OID);
 }
 #endif