diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-09-03 16:00:02 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-09-03 16:00:02 +0000 |
commit | a3c9ef766ba82cc44c826bf14b2e06e337560a33 (patch) | |
tree | 001ecdb3a3a963b7324ad7e4c6f4af44dfdccff3 | |
parent | e167510a4f7b2de7e13f87419e6de3c0a6441dd3 (diff) | |
download | postgresql-a3c9ef766ba82cc44c826bf14b2e06e337560a33.tar.gz postgresql-a3c9ef766ba82cc44c826bf14b2e06e337560a33.zip |
I think reindex_index had better get AccessExclusiveLock on the parent
heap, not just ExclusiveLock.
-rw-r--r-- | src/backend/catalog/index.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c index 489d1c607ea..f91600f94a8 100644 --- a/src/backend/catalog/index.c +++ b/src/backend/catalog/index.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.194 2002/09/03 01:04:41 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.195 2002/09/03 16:00:02 tgl Exp $ * * * INTERFACE ROUTINES @@ -1818,7 +1818,7 @@ reindex_index(Oid indexId, bool force, bool inplace) indexInfo = BuildIndexInfo(iRel->rd_index); /* Open the parent heap relation */ - heapRelation = heap_open(heapId, ExclusiveLock); + heapRelation = heap_open(heapId, AccessExclusiveLock); if (heapRelation == NULL) elog(ERROR, "reindex_index: can't open heap relation"); @@ -1919,8 +1919,8 @@ reindex_relation(Oid relid, bool force) /* * Ensure to hold an exclusive lock throughout the transaction. The - * lock could be less intensive but now it's AccessExclusiveLock for - * simplicity. + * lock could be less intensive (in the non-overwrite path) but now + * it's AccessExclusiveLock for simplicity. */ rel = heap_open(relid, AccessExclusiveLock); |