diff --git a/src/backend/distributed/metadata/metadata_sync.c b/src/backend/distributed/metadata/metadata_sync.c index 371904fe7..295e4f484 100644 --- a/src/backend/distributed/metadata/metadata_sync.c +++ b/src/backend/distributed/metadata/metadata_sync.c @@ -1333,36 +1333,6 @@ LocalGroupIdUpdateCommand(int32 groupId) } -/* - * SequenceDDLCommandsForTable returns a list of commands which create sequences (and - * their schemas) to run on workers before creating the relation. The sequence creation - * commands are wrapped with a `worker_apply_sequence_command` call, which sets the - * sequence space uniquely for each worker. Notice that this function is relevant only - * during metadata propagation to workers and adds nothing to the list of sequence - * commands if none of the workers is marked as receiving metadata changes. - */ -List * -SequenceDDLCommandsForTable(Oid relationId) -{ - List *allSequencesDDLList = NIL; - - List *attnumList = NIL; - List *dependentSequenceList = NIL; - GetDependentSequencesWithRelation(relationId, &attnumList, &dependentSequenceList, 0); - - char *ownerName = TableOwner(relationId); - - Oid sequenceOid = InvalidOid; - foreach_oid(sequenceOid, dependentSequenceList) - { - List *sequenceDDLCommands = DDLCommandsForSequence(sequenceOid, ownerName); - allSequencesDDLList = list_concat(allSequencesDDLList, sequenceDDLCommands); - } - - return allSequencesDDLList; -} - - /* * DDLCommandsForSequence returns the DDL commands needs to be run to create the * sequence and alter the owner to the given owner name. diff --git a/src/include/distributed/metadata_sync.h b/src/include/distributed/metadata_sync.h index 94e62b355..944e8ba41 100644 --- a/src/include/distributed/metadata_sync.h +++ b/src/include/distributed/metadata_sync.h @@ -70,7 +70,6 @@ extern bool ShouldInitiateMetadataSync(bool *lockFailure); extern List * SequenceDependencyCommandList(Oid relationId); extern List * DDLCommandsForSequence(Oid sequenceOid, char *ownerName); -extern List * SequenceDDLCommandsForTable(Oid relationId); extern List * GetSequencesFromAttrDef(Oid attrdefOid); extern void GetDependentSequencesWithRelation(Oid relationId, List **attnumList, List **dependentSequenceList, AttrNumber