diff options
Diffstat (limited to 'src/backend/bootstrap/bootparse.y')
-rw-r--r-- | src/backend/bootstrap/bootparse.y | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/backend/bootstrap/bootparse.y b/src/backend/bootstrap/bootparse.y index f4a1b8f0fdf..eeffb0f990d 100644 --- a/src/backend/bootstrap/bootparse.y +++ b/src/backend/bootstrap/bootparse.y @@ -27,6 +27,7 @@ #include "bootstrap/bootstrap.h" #include "catalog/catalog.h" #include "catalog/heap.h" +#include "catalog/namespace.h" #include "catalog/pg_am.h" #include "catalog/pg_attribute.h" #include "catalog/pg_authid.h" @@ -281,6 +282,7 @@ Boot_DeclareIndexStmt: XDECLARE INDEX boot_ident oidspec ON boot_ident USING boot_ident LPAREN boot_index_params RPAREN { IndexStmt *stmt = makeNode(IndexStmt); + Oid relationId; do_start(); @@ -302,7 +304,12 @@ Boot_DeclareIndexStmt: stmt->initdeferred = false; stmt->concurrent = false; - DefineIndex(stmt, + /* locks and races need not concern us in bootstrap mode */ + relationId = RangeVarGetRelid(stmt->relation, NoLock, + false); + + DefineIndex(relationId, + stmt, $4, false, false, @@ -316,6 +323,7 @@ Boot_DeclareUniqueIndexStmt: XDECLARE UNIQUE INDEX boot_ident oidspec ON boot_ident USING boot_ident LPAREN boot_index_params RPAREN { IndexStmt *stmt = makeNode(IndexStmt); + Oid relationId; do_start(); @@ -337,7 +345,12 @@ Boot_DeclareUniqueIndexStmt: stmt->initdeferred = false; stmt->concurrent = false; - DefineIndex(stmt, + /* locks and races need not concern us in bootstrap mode */ + relationId = RangeVarGetRelid(stmt->relation, NoLock, + false); + + DefineIndex(relationId, + stmt, $5, false, false, |