Rearrange order of operations in heap_drop_with_catalog and index_drop
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 28 Aug 2004 21:05:26 +0000 (21:05 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 28 Aug 2004 21:05:26 +0000 (21:05 +0000)
commit448eb0837f7a8db270481475e8803e1e8a19a37e
treeaa9305f839a99dfec7db3d376cf30b644f2b052e
parenta0a61f494dcaafe37a58cfa0c2bdab328a542f6a
Rearrange order of operations in heap_drop_with_catalog and index_drop
so that we close and flush the doomed relation's relcache entry before
we start to delete the underlying catalog rows, rather than afterwards.
For awhile yesterday I thought that an unexpected relcache entry rebuild
partway through this sequence might explain the infrequent parallel
regression failures we were chasing.  It doesn't, mainly because there's
no CommandCounterIncrement in the sequence and so the deletions aren't
"really" done yet.  But it sure seems like trouble waiting to happen.
src/backend/catalog/heap.c
src/backend/catalog/index.c
src/backend/commands/tablecmds.c
src/include/catalog/heap.h