mirror of https://github.com/citusdata/citus.git
Revert local sequence break change
parent
36fb662bf4
commit
942f1a2c48
|
@ -195,7 +195,7 @@ static void CreateDistributedTableLike(TableConversionState *con);
|
||||||
static void CreateCitusTableLike(TableConversionState *con);
|
static void CreateCitusTableLike(TableConversionState *con);
|
||||||
static List * GetViewCreationCommandsOfTable(Oid relationId);
|
static List * GetViewCreationCommandsOfTable(Oid relationId);
|
||||||
static void ReplaceTable(Oid sourceId, Oid targetId, List *justBeforeDropCommands,
|
static void ReplaceTable(Oid sourceId, Oid targetId, List *justBeforeDropCommands,
|
||||||
bool suppressNoticeMessages, char conversionType);
|
bool suppressNoticeMessages);
|
||||||
static bool HasAnyGeneratedStoredColumns(Oid relationId);
|
static bool HasAnyGeneratedStoredColumns(Oid relationId);
|
||||||
static List * GetNonGeneratedStoredColumnNameList(Oid relationId);
|
static List * GetNonGeneratedStoredColumnNameList(Oid relationId);
|
||||||
static void CheckAlterDistributedTableConversionParameters(TableConversionState *con);
|
static void CheckAlterDistributedTableConversionParameters(TableConversionState *con);
|
||||||
|
@ -741,7 +741,7 @@ ConvertTable(TableConversionState *con)
|
||||||
}
|
}
|
||||||
|
|
||||||
ReplaceTable(con->relationId, con->newRelationId, justBeforeDropCommands,
|
ReplaceTable(con->relationId, con->newRelationId, justBeforeDropCommands,
|
||||||
con->suppressNoticeMessages, con->conversionType);
|
con->suppressNoticeMessages);
|
||||||
|
|
||||||
TableDDLCommand *tableConstructionCommand = NULL;
|
TableDDLCommand *tableConstructionCommand = NULL;
|
||||||
foreach_ptr(tableConstructionCommand, postLoadCommands)
|
foreach_ptr(tableConstructionCommand, postLoadCommands)
|
||||||
|
@ -1295,7 +1295,7 @@ GetViewCreationCommandsOfTable(Oid relationId)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ReplaceTable(Oid sourceId, Oid targetId, List *justBeforeDropCommands,
|
ReplaceTable(Oid sourceId, Oid targetId, List *justBeforeDropCommands,
|
||||||
bool suppressNoticeMessages, char conversionType)
|
bool suppressNoticeMessages)
|
||||||
{
|
{
|
||||||
char *sourceName = get_rel_name(sourceId);
|
char *sourceName = get_rel_name(sourceId);
|
||||||
char *targetName = get_rel_name(targetId);
|
char *targetName = get_rel_name(targetId);
|
||||||
|
@ -1353,15 +1353,6 @@ ReplaceTable(Oid sourceId, Oid targetId, List *justBeforeDropCommands,
|
||||||
changeDependencyFor(RelationRelationId, sequenceOid,
|
changeDependencyFor(RelationRelationId, sequenceOid,
|
||||||
RelationRelationId, sourceId, targetId);
|
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.
|
* Skip if we cannot sync metadata for target table.
|
||||||
* Checking only for the target table is sufficient since we will
|
* Checking only for the target table is sufficient since we will
|
||||||
|
|
Loading…
Reference in New Issue