Fixes runtime errors

pull/7253/head
gindibay 2023-11-21 19:40:44 +03:00
parent a1ab60f5ad
commit 3dd4735e6e
3 changed files with 0 additions and 44 deletions

View File

@ -77,7 +77,6 @@ typedef struct DatabaseCollationInfo
#endif
} DatabaseCollationInfo;
static void EnsureSupportedCreateDatabaseCommand(CreatedbStmt *stmt);
static char * GenerateCreateDatabaseStatementFromPgDatabase(Form_pg_database
databaseForm);
static DatabaseCollationInfo GetDatabaseCollation(Oid dbOid);

View File

@ -155,7 +155,6 @@ static char * RemoteSchemaIdExpressionByName(char *schemaName);
static char * RemoteTypeIdExpression(Oid typeId);
static char * RemoteCollationIdExpression(Oid colocationId);
static char * RemoteTableIdExpression(Oid relationId);
static void SendDatabaseGrantSyncCommands(MetadataSyncContext *context);
PG_FUNCTION_INFO_V1(start_metadata_sync_to_all_nodes);
@ -4666,13 +4665,6 @@ PropagateNodeWideObjectsCommandList(void)
ddlCommands = list_concat(ddlCommands, alterRoleSetCommands);
}
if (EnableCreateDatabasePropagation)
{
/* get commands for database creation */
List *createDatabaseCommands = GenerateCreateDatabaseCommandList();
ddlCommands = list_concat(ddlCommands, createDatabaseCommands);
}
return ddlCommands;
}
@ -4745,12 +4737,7 @@ SyncDistributedObjects(MetadataSyncContext *context)
*/
SendInterTableRelationshipCommands(context);
/*
* After creation of databases and roles, send the grant database commands
* to the workers.
*/
SendDatabaseGrantSyncCommands(context);
}
@ -4775,35 +4762,6 @@ SendNodeWideObjectsSyncCommands(MetadataSyncContext *context)
SendOrCollectCommandListToActivatedNodes(context, commandList);
}
/*
* SendDatabaseGrantSyncCommands sends database grants to roles to workers with
* transactional or nontransactional mode according to transactionMode inside
* metadataSyncContext in case of EnableCreateDatabasePropagation GUC set.
* This function is called after SendNodeWideObjectsSyncCommands and SendDependencyCreationCommands
* because we need both databases and roles to be created on the worker.
*
*/
static void
SendDatabaseGrantSyncCommands(MetadataSyncContext *context)
{
if (EnableCreateDatabasePropagation)
{
/* propagate node wide objects. It includes only roles for now. */
List *commandList = GenerateGrantDatabaseCommandList();
if (commandList == NIL)
{
return;
}
commandList = lcons(DISABLE_DDL_PROPAGATION, commandList);
commandList = lappend(commandList, ENABLE_DDL_PROPAGATION);
SendOrCollectCommandListToActivatedNodes(context, commandList);
}
}
/*
* SendShellTableDeletionCommands sends sequence, and shell table deletion
* commands to workers with transactional or nontransactional mode according to

View File

@ -243,7 +243,6 @@ extern List * DropDatabaseStmtObjectAddress(Node *node, bool missingOk,
bool isPostprocess);
extern List * CreateDatabaseStmtObjectAddress(Node *node, bool missingOk,
bool isPostprocess);
extern List * GenerateCreateDatabaseCommandList(void);
extern List * GenerateGrantDatabaseCommandList(void);