Citus indent

velioglu/wo_seq_test_1
Burak Velioglu 2022-01-12 15:26:01 +03:00
parent ad67942cda
commit 9fc09947ed
No known key found for this signature in database
GPG Key ID: F6827E620F6549C6
4 changed files with 9 additions and 7 deletions

View File

@ -235,7 +235,8 @@ GetDependencyCreateDDLCommands(const ObjectAddress *dependency)
return NIL; return NIL;
} }
if (relKind == RELKIND_RELATION || relKind == RELKIND_PARTITIONED_TABLE || relKind == RELKIND_FOREIGN_TABLE) if (relKind == RELKIND_RELATION || relKind == RELKIND_PARTITIONED_TABLE ||
relKind == RELKIND_FOREIGN_TABLE)
{ {
Oid relationId = dependency->objectId; Oid relationId = dependency->objectId;
if (IsCitusTable(relationId) && !IsTableOwnedByExtension(relationId)) if (IsCitusTable(relationId) && !IsTableOwnedByExtension(relationId))

View File

@ -955,7 +955,7 @@ LookupNodeForGroup(int32 groupId)
if (!foundAnyNodes) if (!foundAnyNodes)
{ {
ereport(ERROR, (errmsg("there is a shard placement in node group %d but " ereport(ERROR, (errmsg("there is a shard placement in node group %d but "
"there are no nodes in that group", groupId))); "there are no nodes in that group", groupId)));
} }
switch (ReadFromSecondaries) switch (ReadFromSecondaries)

View File

@ -695,7 +695,7 @@ SetUpObjectMetadata(WorkerNode *workerNode)
char *truncateTriggerCreateCommand = char *truncateTriggerCreateCommand =
TruncateTriggerCreateCommand(clusteredTableId); TruncateTriggerCreateCommand(clusteredTableId);
metadataSnapshotCommandList = lappend(metadataSnapshotCommandList, metadataSnapshotCommandList = lappend(metadataSnapshotCommandList,
truncateTriggerCreateCommand); truncateTriggerCreateCommand);
} }
/* add the pg_dist_shard{,placement} entries */ /* add the pg_dist_shard{,placement} entries */
@ -1225,7 +1225,7 @@ ActivateNode(char *nodeName, int nodePort)
SetWorkerColumnLocalOnly(workerNode, Anum_pg_dist_node_isactive, SetWorkerColumnLocalOnly(workerNode, Anum_pg_dist_node_isactive,
BoolGetDatum(isActive)); BoolGetDatum(isActive));
// TODO: Once all tests will be enabled for MX, we can remove sync by default check /* TODO: Once all tests will be enabled for MX, we can remove sync by default check */
bool syncMetadata = EnableMetadataSyncByDefault && NodeIsPrimary(workerNode); bool syncMetadata = EnableMetadataSyncByDefault && NodeIsPrimary(workerNode);
if (syncMetadata) if (syncMetadata)

View File

@ -481,7 +481,8 @@ worker_apply_sequence_command(PG_FUNCTION_ARGS)
if (pgSequenceForm->seqtypid != sequenceTypeId) if (pgSequenceForm->seqtypid != sequenceTypeId)
{ {
StringInfo dropSequenceString = makeStringInfo(); StringInfo dropSequenceString = makeStringInfo();
char *qualifiedSequenceName = quote_qualified_identifier(sequenceSchema, sequenceName); char *qualifiedSequenceName = quote_qualified_identifier(sequenceSchema,
sequenceName);
appendStringInfoString(dropSequenceString, "DROP SEQUENCE "); appendStringInfoString(dropSequenceString, "DROP SEQUENCE ");
appendStringInfoString(dropSequenceString, qualifiedSequenceName); appendStringInfoString(dropSequenceString, qualifiedSequenceName);
appendStringInfoString(dropSequenceString, ";"); appendStringInfoString(dropSequenceString, ";");
@ -495,7 +496,7 @@ worker_apply_sequence_command(PG_FUNCTION_ARGS)
CommandCounterIncrement(); CommandCounterIncrement();
sequenceRelationId = RangeVarGetRelid(createSequenceStatement->sequence, sequenceRelationId = RangeVarGetRelid(createSequenceStatement->sequence,
AccessShareLock, false); AccessShareLock, false);
Assert(sequenceRelationId != InvalidOid); Assert(sequenceRelationId != InvalidOid);
AlterSequenceMinMax(sequenceRelationId, sequenceSchema, sequenceName, sequenceTypeId); AlterSequenceMinMax(sequenceRelationId, sequenceSchema, sequenceName, sequenceTypeId);