Revert local sequence break change

velioglu/wo_seq_test_1
Burak Velioglu 2022-01-07 12:55:47 +03:00
parent 36fb662bf4
commit 942f1a2c48
No known key found for this signature in database
GPG Key ID: F6827E620F6549C6
1 changed files with 3 additions and 12 deletions

View File

@ -195,7 +195,7 @@ static void CreateDistributedTableLike(TableConversionState *con);
static void CreateCitusTableLike(TableConversionState *con);
static List * GetViewCreationCommandsOfTable(Oid relationId);
static void ReplaceTable(Oid sourceId, Oid targetId, List *justBeforeDropCommands,
bool suppressNoticeMessages, char conversionType);
bool suppressNoticeMessages);
static bool HasAnyGeneratedStoredColumns(Oid relationId);
static List * GetNonGeneratedStoredColumnNameList(Oid relationId);
static void CheckAlterDistributedTableConversionParameters(TableConversionState *con);
@ -741,7 +741,7 @@ ConvertTable(TableConversionState *con)
}
ReplaceTable(con->relationId, con->newRelationId, justBeforeDropCommands,
con->suppressNoticeMessages, con->conversionType);
con->suppressNoticeMessages);
TableDDLCommand *tableConstructionCommand = NULL;
foreach_ptr(tableConstructionCommand, postLoadCommands)
@ -1295,7 +1295,7 @@ GetViewCreationCommandsOfTable(Oid relationId)
*/
void
ReplaceTable(Oid sourceId, Oid targetId, List *justBeforeDropCommands,
bool suppressNoticeMessages, char conversionType)
bool suppressNoticeMessages)
{
char *sourceName = get_rel_name(sourceId);
char *targetName = get_rel_name(targetId);
@ -1353,15 +1353,6 @@ ReplaceTable(Oid sourceId, Oid targetId, List *justBeforeDropCommands,
changeDependencyFor(RelationRelationId, sequenceOid,
RelationRelationId, sourceId, targetId);
/* Changing the dependency for sequence will prevent PG to have */
/* sequence within drop trigger */
if (conversionType == UNDISTRIBUTE_TABLE)
{
ObjectAddress sequenceAddress = { 0 };
ObjectAddressSet(sequenceAddress, RelationRelationId, sequenceOid);
UnmarkObjectDistributed(&sequenceAddress);
}
/*
* Skip if we cannot sync metadata for target table.
* Checking only for the target table is sufficient since we will