mirror of https://github.com/citusdata/citus.git
Move shell table creation out
parent
3d828bc7b6
commit
b9d1ab38af
|
@ -450,10 +450,11 @@ CreateDistributedTable(Oid relationId, Var *distributionColumn, char distributio
|
|||
ObjectAddressSet(tableAddress, RelationRelationId, relationId);
|
||||
EnsureDependenciesExistOnAllNodes(&tableAddress);
|
||||
|
||||
CreateShellTableOnWorkers(relationId);
|
||||
|
||||
/* TODO: Consider partitioned tables */
|
||||
if (ShouldSyncTableMetadata(relationId))
|
||||
if (EnableDependencyCreation)
|
||||
{
|
||||
CreateShellTableOnWorkers(relationId);
|
||||
MarkObjectDistributed(&tableAddress);
|
||||
}
|
||||
|
||||
|
|
|
@ -1459,8 +1459,6 @@ ShouldShutdownConnection(MultiConnection *connection, const int cachedConnection
|
|||
bool
|
||||
IsCitusInitiatedRemoteBackend(void)
|
||||
{
|
||||
elog(WARNING, "IsCitusInitiatedRemoteBackend");
|
||||
elog(WARNING, "Application name is %s", application_name);
|
||||
return application_name && strcmp(application_name, CITUS_APPLICATION_NAME) == 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -676,7 +676,7 @@ SupportedDependencyByCitus(const ObjectAddress *address)
|
|||
* for tables.
|
||||
*/
|
||||
if (relKind == RELKIND_COMPOSITE_TYPE ||
|
||||
(relKind == RELKIND_RELATION && IsCitusTable(address->objectId)) ||
|
||||
relKind == RELKIND_RELATION || // TODO: Should check for normal tables?
|
||||
relKind == RELKIND_SEQUENCE)
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -538,9 +538,8 @@ MetadataCreateCommands(void)
|
|||
|
||||
/*
|
||||
* GetDistributedTableMetadataEvents returns the full set of DDL commands necessary to
|
||||
* create the given distributed table on a worker. The list includes setting up any
|
||||
* sequences, setting the owner of the table, inserting table and shard metadata,
|
||||
* setting the truncate trigger and foreign key constraints.
|
||||
* create the given distributed table metadata on a worker. The list includes setting up
|
||||
* any shard metadata, setting the truncate trigger and foreign key constraints.
|
||||
*/
|
||||
static List *
|
||||
GetDistributedTableMetadataEvents(Oid relationId)
|
||||
|
|
Loading…
Reference in New Issue