mirror of https://github.com/citusdata/citus.git
Citus indent
parent
e610a147a1
commit
cc68e87903
|
@ -1354,8 +1354,8 @@ 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
|
||||
/* Changing the dependency for sequence will prevent PG to have */
|
||||
/* sequence within drop trigger */
|
||||
if (conversionType == UNDISTRIBUTE_TABLE)
|
||||
{
|
||||
ObjectAddress sequenceAddress = { 0 };
|
||||
|
|
|
@ -1250,7 +1250,7 @@ FinalizeCitusLocalTableCreation(Oid relationId, List *dependentSequenceList)
|
|||
}
|
||||
else
|
||||
{
|
||||
// Mark the table as distributed only locally
|
||||
/* Mark the table as distributed only locally */
|
||||
bool prevDependencyCreationValue = EnableDependencyCreation;
|
||||
SetLocalEnableDependencyCreation(false);
|
||||
MarkObjectDistributed(&relationAddress);
|
||||
|
|
|
@ -540,7 +540,7 @@ CreateDistributedTable(Oid relationId, Var *distributionColumn, char distributio
|
|||
}
|
||||
else
|
||||
{
|
||||
// Mark the table as distributed only locally
|
||||
/* Mark the table as distributed only locally */
|
||||
bool prevDependencyCreationValue = EnableDependencyCreation;
|
||||
SetLocalEnableDependencyCreation(false);
|
||||
MarkObjectDistributed(&tableAddress);
|
||||
|
|
|
@ -242,7 +242,7 @@ GetDependencyCreateDDLCommands(const ObjectAddress *dependency)
|
|||
if (IsCitusTable(relationId) && !IsTableOwnedByExtension(relationId))
|
||||
{
|
||||
/* skip table metadata creation when the Citus table is owned by an extension */
|
||||
// TODO: Check sequence next val type
|
||||
/* TODO: Check sequence next val type */
|
||||
List *commandList = NIL;
|
||||
List *tableDDLCommands = GetFullTableCreationCommands(relationId,
|
||||
WORKER_NEXTVAL_SEQUENCE_DEFAULTS);
|
||||
|
@ -266,7 +266,7 @@ GetDependencyCreateDDLCommands(const ObjectAddress *dependency)
|
|||
|
||||
if (relKind == RELKIND_SEQUENCE)
|
||||
{
|
||||
// TODO: Check user name for different scenarios
|
||||
/* TODO: Check user name for different scenarios */
|
||||
char *userName = GetUserNameFromId(GetUserId(), false);
|
||||
return DDLCommandsForSequence(dependency->objectId, userName);
|
||||
}
|
||||
|
@ -403,7 +403,8 @@ ReplicateAllDependenciesToNode(const char *nodeName, int nodePort)
|
|||
ddlCommands = lcons(DISABLE_DDL_PROPAGATION, ddlCommands);
|
||||
ddlCommands = lappend(ddlCommands, ENABLE_DDL_PROPAGATION);
|
||||
|
||||
SendCommandListToWorkerOutsideTransaction(nodeName, nodePort, CitusExtensionOwnerName(), ddlCommands);
|
||||
SendCommandListToWorkerOutsideTransaction(nodeName, nodePort,
|
||||
CitusExtensionOwnerName(), ddlCommands);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -827,7 +827,8 @@ ClearDistributedTablesFromNode(WorkerNode *workerNode)
|
|||
|
||||
clearDistributedTablesCommandList = list_concat(list_make1(DISABLE_DDL_PROPAGATION),
|
||||
clearDistributedTablesCommandList);
|
||||
clearDistributedTablesCommandList = list_concat(clearDistributedTablesCommandList, list_make1(
|
||||
clearDistributedTablesCommandList = list_concat(clearDistributedTablesCommandList,
|
||||
list_make1(
|
||||
ENABLE_DDL_PROPAGATION));
|
||||
|
||||
SendCommandListToWorkerOutsideTransaction(workerNode->workerName,
|
||||
|
@ -906,14 +907,15 @@ SetUpDistributedTableWithDependencies(WorkerNode *newWorkerNode)
|
|||
* We prefer this because otherwise node activation might fail within
|
||||
* transaction blocks.
|
||||
*/
|
||||
// TODO: Doesn't make sense to have that here as we won't handle placement metadata
|
||||
// with maintenance daemon anymore
|
||||
/* TODO: Doesn't make sense to have that here as we won't handle placement metadata */
|
||||
/* with maintenance daemon anymore */
|
||||
|
||||
/* if (ClusterHasDistributedFunctionWithDistArgument())
|
||||
{
|
||||
SetWorkerColumnLocalOnly(newWorkerNode, Anum_pg_dist_node_hasmetadata,
|
||||
BoolGetDatum(true));
|
||||
TriggerMetadataSyncOnCommit();
|
||||
}*/
|
||||
* {
|
||||
* SetWorkerColumnLocalOnly(newWorkerNode, Anum_pg_dist_node_hasmetadata,
|
||||
* BoolGetDatum(true));
|
||||
* TriggerMetadataSyncOnCommit();
|
||||
* }*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue