Fix LOAD_CRIT_INDEX() macro to take out AccessShareLock on the system index
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 16 Apr 2008 18:23:12 +0000 (18:23 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 16 Apr 2008 18:23:12 +0000 (18:23 +0000)
commitf2e77b98d74b5b913f2bf2675c86ab33d40b1bf1
tree2babeb6d8687797142b1983f4db3eec19787b47e
parent161d81d838807231f02fef8a75e01a3ff04bfca6
Fix LOAD_CRIT_INDEX() macro to take out AccessShareLock on the system index
it is trying to build a relcache entry for.  This is an oversight in my 8.2
patch that tried to ensure we always took a lock on a relation before trying
to build its relcache entry.  The implication is that if someone committed a
reindex of a critical system index at about the same time that some other
backend were starting up without a valid pg_internal.init file, the second one
might PANIC due to not seeing any valid version of the index's pg_class row.
Improbable case, but definitely not impossible.
src/backend/utils/cache/relcache.c