summaryrefslogtreecommitdiff
path: root/src/backend/access/index/indexam.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/index/indexam.c')
-rw-r--r--src/backend/access/index/indexam.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c
index a445efc7154..624b53d635c 100644
--- a/src/backend/access/index/indexam.c
+++ b/src/backend/access/index/indexam.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/index/indexam.c,v 1.83 2005/06/13 23:14:48 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/access/index/indexam.c,v 1.84 2005/06/27 12:45:22 teodor Exp $
*
* INTERFACE ROUTINES
* index_open - open an index relation by relation OID
@@ -287,7 +287,6 @@ index_beginscan_internal(Relation indexRelation,
FmgrInfo *procedure;
RELATION_CHECKS;
- GET_REL_PROCEDURE(ambeginscan);
RelationIncrementReferenceCount(indexRelation);
@@ -301,6 +300,13 @@ index_beginscan_internal(Relation indexRelation,
LockRelation(indexRelation, AccessShareLock);
/*
+ * LockRelation can clean rd_aminfo structure, so fill procedure
+ * after LockRelation
+ */
+
+ GET_REL_PROCEDURE(ambeginscan);
+
+ /*
* Tell the AM to open a scan.
*/
scan = (IndexScanDesc)