Mark sequence distributed explicitly while syncing metadata

Since sequences are not marked as distributed while creating table if no
metadata worker node exists, we are marking all sequences distributed
while syncing metadata explicitly.
pull/5415/head
Burak Velioglu 2021-12-02 00:07:00 +03:00
parent 6d849cf394
commit 21194c3b9d
No known key found for this signature in database
GPG Key ID: F6827E620F6549C6
1 changed files with 7 additions and 0 deletions

View File

@ -604,6 +604,13 @@ MetadataCreateCommands(void)
ObjectAddress sequenceAddress = { 0 };
ObjectAddressSet(sequenceAddress, RelationRelationId, sequenceOid);
EnsureDependenciesExistOnAllNodes(&sequenceAddress);
/*
* Sequences are not marked as distributed while creating table
* if no metadata worker node exists. We are marking all sequences
* distributed while syncing metadata in such case.
*/
MarkObjectDistributed(&sequenceAddress);
}
SetLocalEnableDependencyCreation(prevDependencyCreationValue);