citusdata / citus

Distributed PostgreSQL as an extension
https://www.citusdata.com
GNU Affero General Public License v3.0
10.58k stars 670 forks source link

Regression tests: Change master_create_* calls with create_distributed_table #1908

Open ozgune opened 6 years ago

ozgune commented 6 years ago

In Citus 6.0, we changed our table creation APIs. Customers would previously call master_create_distributed_table() and master_create_worker_shards() to create distributed tables. We deprecated these APIs in favor of create_distributed_table().

We still use the deprecated APIs in 54 regression tests. We should update these regressions to the new APIs. We found that the old APIs fall into three groups:

As we are converting the old APIs, we should pay attention to the shard count and replication factor settings. Today, we set the replication factor through a GUC.

onderkalaci commented 6 years ago

We've lots of SELECT create_distributed_table('referencing_table', 'ref_id', 'hash'); which is confusing. We should consider replacing them SELECT create_distributed_table('referencing_table', 'ref_id'); (e.g., remove hash from the calls).