From: | tgl(at)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix brain fade in DefineIndex(): it was continuing to access the |
Date: | 2007-08-25 19:08:19 |
Message-ID: | 20070825190819.3CE897541FB@cvs.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Log Message:
-----------
Fix brain fade in DefineIndex(): it was continuing to access the table's
relcache entry after having heap_close'd it. This could lead to misbehavior
if a relcache flush wiped out the cache entry meanwhile. In 8.2 there is a
very real risk of CREATE INDEX CONCURRENTLY using the wrong relid for locking
and waiting purposes. I think the bug is only cosmetic in 8.0 and 8.1,
because their transgression is limited to using RelationGetRelationName(rel)
in an ereport message immediately after heap_close, and there's no way (except
with special debugging options) for a cache flush to occur in that interval.
Not quite sure that it's cosmetic in 7.4, but seems best to patch anyway.
Found by trying to run the regression tests with CLOBBER_CACHE_ALWAYS enabled.
Maybe we should try to do that on a regular basis --- it's awfully slow,
but perhaps some fast buildfarm machine could do it once in awhile.
Modified Files:
--------------
pgsql/src/backend/commands:
indexcmds.c (r1.161 -> r1.162)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/indexcmds.c?r1=1.161&r2=1.162)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-08-25 19:08:25 | pgsql: Fix brain fade in DefineIndex(): it was continuing to access the |
Previous Message | Tom Lane | 2007-08-25 17:47:44 | pgsql: Simplify implementation of ts_debug() function --- use a join |
From | Date | Subject | |
---|---|---|---|
Next Message | Oleg Bartunov | 2007-08-25 19:10:02 | Re: Best implementation of PATRICIA |
Previous Message | Zeugswetter Andreas ADI SD | 2007-08-25 19:06:19 | Re: SQL feature requests |