pgsql: Avoid crashing if relcache flush occurs while trying to load data

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Avoid crashing if relcache flush occurs while trying to load data
Date: 2006-01-19 20:28:58
Message-ID: 20060119202858.4DB9C9DC9A2@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Tags:
----
REL8_0_STABLE

Modified Files:
--------------
pgsql/src/backend/utils/cache:
relcache.c (r1.215 -> r1.215.4.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/relcache.c.diff?r1=1.215&r2=1.215.4.1)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2006-01-19 20:45:21 pgsql: Remove $(DESTDIR) from the pgxs BE_DLLLIBS= -L path.
Previous Message Tom Lane 2006-01-19 20:28:49 pgsql: Avoid crashing if relcache flush occurs while trying to load data