diff options
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r-- | src/backend/commands/tablecmds.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 13bb8811204..52ce6b0c92a 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -20383,6 +20383,7 @@ createPartitionTable(RangeVar *newPartName, Relation modelRel, tlc->options = CREATE_TABLE_LIKE_ALL & ~(CREATE_TABLE_LIKE_INDEXES | CREATE_TABLE_LIKE_IDENTITY | CREATE_TABLE_LIKE_STATISTICS); tlc->relationOid = InvalidOid; + tlc->newRelationOid = InvalidOid; createStmt->tableElts = lappend(createStmt->tableElts, tlc); /* Need to make a wrapper PlannedStmt. */ @@ -20406,7 +20407,7 @@ createPartitionTable(RangeVar *newPartName, Relation modelRel, * Open the new partition with no lock, because we already have * AccessExclusiveLock placed there after creation. */ - newRel = table_openrv(newPartName, NoLock); + newRel = table_open(tlc->newRelationOid, NoLock); /* * We intended to create the partition with the same persistence as the |