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