From 21194c3b9d30a7043e24daeaf1472bd6e307f574 Mon Sep 17 00:00:00 2001 From: Burak Velioglu Date: Thu, 2 Dec 2021 00:07:00 +0300 Subject: [PATCH] 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. --- src/backend/distributed/metadata/metadata_sync.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/backend/distributed/metadata/metadata_sync.c b/src/backend/distributed/metadata/metadata_sync.c index 6dbbf197c..ecd01a2ab 100644 --- a/src/backend/distributed/metadata/metadata_sync.c +++ b/src/backend/distributed/metadata/metadata_sync.c @@ -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);