drop_rep_coordinator
Onder Kalaci 2022-11-24 16:38:34 +01:00
parent a477ffdf4b
commit 4b0090952d
4 changed files with 2 additions and 10 deletions

View File

@ -1423,15 +1423,10 @@ DecideReplicationModel(char distributionMethod, char *colocateWithTableName)
return replicationModel; return replicationModel;
} }
else if (distributionMethod == DISTRIBUTE_BY_HASH && else if (distributionMethod == DISTRIBUTE_BY_HASH)
!DistributedTableReplicationIsEnabled())
{ {
return REPLICATION_MODEL_STREAMING; return REPLICATION_MODEL_STREAMING;
} }
else
{
return REPLICATION_MODEL_COORDINATOR;
}
/* we should not reach to this point */ /* we should not reach to this point */
return REPLICATION_MODEL_INVALID; return REPLICATION_MODEL_INVALID;

View File

@ -3173,8 +3173,7 @@ EnsurePartitionMetadataIsSane(Oid relationId, char distributionMethod, int coloc
if (!(replicationModel == REPLICATION_MODEL_2PC || if (!(replicationModel == REPLICATION_MODEL_2PC ||
replicationModel == REPLICATION_MODEL_STREAMING || replicationModel == REPLICATION_MODEL_STREAMING))
replicationModel == REPLICATION_MODEL_COORDINATOR))
{ {
ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("Metadata syncing is only allowed for " errmsg("Metadata syncing is only allowed for "

View File

@ -227,7 +227,6 @@ static const struct config_enum_entry task_assignment_policy_options[] = {
}; };
static const struct config_enum_entry replication_model_options[] = { static const struct config_enum_entry replication_model_options[] = {
{ "statement", REPLICATION_MODEL_COORDINATOR, false },
{ "streaming", REPLICATION_MODEL_STREAMING, false }, { "streaming", REPLICATION_MODEL_STREAMING, false },
{ NULL, 0, false } { NULL, 0, false }
}; };

View File

@ -63,7 +63,6 @@ typedef FormData_pg_dist_partition *Form_pg_dist_partition;
* and 't' for two-phase-commit. We also use an invalid replication model * and 't' for two-phase-commit. We also use an invalid replication model
* ('i') for distinguishing uninitialized variables where necessary. * ('i') for distinguishing uninitialized variables where necessary.
*/ */
#define REPLICATION_MODEL_COORDINATOR 'c'
#define REPLICATION_MODEL_STREAMING 's' #define REPLICATION_MODEL_STREAMING 's'
#define REPLICATION_MODEL_2PC 't' #define REPLICATION_MODEL_2PC 't'
#define REPLICATION_MODEL_INVALID 'i' #define REPLICATION_MODEL_INVALID 'i'