In PrepareToInvalidateCacheTuple, don't force initialization of catalog
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 5 Mar 2008 17:01:33 +0000 (17:01 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 5 Mar 2008 17:01:33 +0000 (17:01 +0000)
commitcdb7ad5351b8e52ffbd30990f16bd18aa0e9041b
tree06f7c8bdf9669e1d90fd7470833d4ff22c7d558b
parentfcbf2026001daa9ddfaf01b2c9221bb53871184b
In PrepareToInvalidateCacheTuple, don't force initialization of catalog
caches that we don't actually need to touch.  This saves some trivial
number of cycles and avoids certain cases of deadlock when doing concurrent
VACUUM FULL on system catalogs.  Per report from Gavin Roy.

Backpatch to 8.2.  In earlier versions, CatalogCacheInitializeCache didn't
lock the relation so there's no deadlock risk (though that certainly had
plenty of risks of its own).
src/backend/utils/cache/catcache.c