Add todos

velioglu/wo_seq_test_1
Burak Velioglu 2021-12-20 15:44:01 +03:00
parent ab29b939b2
commit 2e61c3e6b8
No known key found for this signature in database
GPG Key ID: F6827E620F6549C6
1 changed files with 5 additions and 2 deletions

View File

@ -58,14 +58,15 @@ EnsureDependenciesExistOnAllNodes(const ObjectAddress *target)
/* collect all dependencies in creation order and get their ddl commands */
List *dependencies = GetDependenciesForObject(target);
/* TODO: Might add check for PG (not Citus) tables */
ObjectAddress *dependency = NULL;
foreach_ptr(dependency, dependencies)
{
List *dependencyCommands = GetDependencyCreateDDLCommands(dependency);
ddlCommands = list_concat(ddlCommands, dependencyCommands);
/* TODO: Might add check for tables */
/* create a new list with dependencies that actually created commands */
if (list_length(dependencyCommands) > 0)
{
@ -243,6 +244,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
List *commandList = NIL;
List *tableDDLCommands = GetFullTableCreationCommands(relationId,
WORKER_NEXTVAL_SEQUENCE_DEFAULTS);
@ -266,6 +268,7 @@ GetDependencyCreateDDLCommands(const ObjectAddress *dependency)
if (relKind == RELKIND_SEQUENCE)
{
// TODO: Check user name for different scenarios
char *userName = GetUserNameFromId(GetUserId(), false);
return DDLCommandsForSequence(dependency->objectId, userName);
}