aboutsummaryrefslogtreecommitdiff
path: root/src/backend/catalog/index.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/catalog/index.c')
-rw-r--r--src/backend/catalog/index.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index 602b51a6a79..64a45f4ed4a 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -3010,10 +3010,9 @@ index_build(Relation heapRelation,
* relfilenode won't change, and nothing needs to be done here.
*/
if (indexRelation->rd_rel->relpersistence == RELPERSISTENCE_UNLOGGED &&
- !smgrexists(indexRelation->rd_smgr, INIT_FORKNUM))
+ !smgrexists(RelationGetSmgr(indexRelation), INIT_FORKNUM))
{
- RelationOpenSmgr(indexRelation);
- smgrcreate(indexRelation->rd_smgr, INIT_FORKNUM, false);
+ smgrcreate(RelationGetSmgr(indexRelation), INIT_FORKNUM, false);
indexRelation->rd_indam->ambuildempty(indexRelation);
}