Rearrange order of operations in heap_drop_with_catalog and index_drop

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 448eb0837f7a8db270481475e8803e1e8a19a37e
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2004-08-28T21:05:26Z
Releases: 8.0.0
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.

Files

PathChange+/−
src/backend/catalog/heap.c modified +40 −45
src/backend/catalog/index.c modified +23 −19
src/backend/commands/tablecmds.c modified +2 −2
src/include/catalog/heap.h modified +3 −3