aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistproc.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-08-25 19:08:31 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-08-25 19:08:31 +0000
commitd7e1fa482a941c4b5a762ae3c3876904c7751c19 (patch)
tree761f3f8a944d3ed9bce5a7d579182c2f5e1ccacf /src/backend/access/gist/gistproc.c
parentd68b66984c00c9364caaa1fa8c3bf60403e1df89 (diff)
downloadpostgresql-d7e1fa482a941c4b5a762ae3c3876904c7751c19.tar.gz
postgresql-d7e1fa482a941c4b5a762ae3c3876904c7751c19.zip
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.
Diffstat (limited to 'src/backend/access/gist/gistproc.c')
0 files changed, 0 insertions, 0 deletions