]> granicus.if.org Git - postgresql/commit
Avoid crashing if relcache flush occurs while trying to load data into an
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 19 Jan 2006 20:28:57 +0000 (20:28 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 19 Jan 2006 20:28:57 +0000 (20:28 +0000)
commita290087cd104d8a0294f43235d7a5f12e8b5f11a
treeedc73193db4c67230075bfdf4d987d9c7fcc9115
parent92d1dd845fddd7fffa2435b51711516e7fc03d76
Avoid crashing if relcache flush occurs while trying to load data into an
index's support-function cache (in index_getprocinfo).  Since none of that
data can change for an index that's in active use, it seems sufficient to
treat all open indexes the same way we were treating "nailed" system indexes
--- that is, just re-read the pg_class row and leave the rest of the relcache
entry strictly alone.  The pg_class re-read might not be strictly necessary
either, but since the reltablespace and relfilenode can change in normal
operation it seems safest to do it.  (We don't support changing any of the
other info about an index at all, at the moment.)

Back-patch as far as 8.0.  It might be possible to adapt the patch to 7.4,
but it would take more work than I care to expend for such a low-probability
problem.  7.3 is out of luck for sure.
src/backend/utils/cache/relcache.c