Use shared lock when building indices
authorVadim B. Mikheev
Mon, 27 Oct 1997 11:52:43 +0000 (11:52 +0000)
committerVadim B. Mikheev
Mon, 27 Oct 1997 11:52:43 +0000 (11:52 +0000)
src/backend/catalog/index.c

index 6c391d21079c8cc249b757c1411465761022d14d..454a7795cc7b9922e84bc7e42b01b51eda5ad514 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.23 1997/09/18 20:20:14 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.24 1997/10/27 11:52:43 vadim Exp $
  *
  *
  * INTERFACE ROUTINES
@@ -1103,9 +1103,12 @@ index_create(char *heapRelationName,
    /* ----------------
     * write lock heap to guarantee exclusive access
     * ----------------
+   RelationSetLockForWrite(heapRelation);
+    *                ^^^^^
+    * Does it have any sense ?     - vadim 10/27/97
     */
 
-   RelationSetLockForWrite(heapRelation);
+   RelationSetLockForRead(heapRelation);
 
    /* ----------------
     *    construct new tuple descriptor