Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit abc2e7a

Browse files
committed
fix index command for unexisintg relation; replicate create schema
1 parent 8b0be38 commit abc2e7a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

multimaster.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2462,9 +2462,13 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
24622462
"CREATE INDEX CONCURRENTLY");
24632463

24642464
relid = RelnameGetRelid(stmt->relation->relname);
2465-
rel = heap_open(relid, ShareLock);
2466-
skipCommand = rel->rd_rel->relpersistence == RELPERSISTENCE_TEMP;
2467-
heap_close(rel, NoLock);
2465+
2466+
if (OidIsValid(relid))
2467+
{
2468+
rel = heap_open(relid, ShareLock);
2469+
skipCommand = rel->rd_rel->relpersistence == RELPERSISTENCE_TEMP;
2470+
heap_close(rel, NoLock);
2471+
}
24682472
}
24692473
break;
24702474
case T_DropStmt:
@@ -2486,6 +2490,7 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
24862490
}
24872491
}
24882492
break;
2493+
case T_CreateSchemaStmt:
24892494
default:
24902495
skipCommand = false;
24912496
break;

0 commit comments

Comments
 (0)