citus/src/backend/distributed/transaction
Onur Tirtir fa467e05e7 Add support for creating distributed tables with a null shard key (#6745)
With this PR, we allow creating distributed tables with without
specifying a shard key via create_distributed_table(). Here are the
the important details about those tables:
* Specifying `shard_count` is not allowed because it is assumed to be 1.
* We mostly call such tables as "null shard-key" table in code /
comments.
* To avoid doing a breaking layout change in create_distributed_table();
instead of throwing an error, it will inform the user that
`distribution_type`
  param is ignored unless it's explicitly set to NULL or  'h'.
* `colocate_with` param allows colocating such null shard-key tables to
  each other.
* We define this table type, i.e., NULL_SHARD_KEY_TABLE, as a subclass
of
  DISTRIBUTED_TABLE because we mostly want to treat them as distributed
  tables in terms of SQL / DDL / operation support.
* Metadata for such tables look like:
  - distribution method => DISTRIBUTE_BY_NONE
  - replication model => REPLICATION_MODEL_STREAMING
- colocation id => **!=** INVALID_COLOCATION_ID (distinguishes from
Citus local tables)
* We assign colocation groups for such tables to different nodes in a
  round-robin fashion based on the modulo of "colocation id".

Note that this PR doesn't care about DDL (except CREATE TABLE) / SQL /
operation (i.e., Citus UDFs) support for such tables but adds a
preliminary
API.
2023-05-03 16:18:27 +03:00
..
backend_data.c PR #6728  / commit - 9 2023-03-30 10:53:22 +03:00
citus_dist_stat_activity.c Updates citus_dist_stat_activity to use citus_stat_activity 2022-03-04 17:28:17 +03:00
distributed_deadlock_detection.c Remove unused functions (#6220) 2022-08-22 11:53:25 +03:00
lock_graph.c Check the PGPROC's validity properly 2022-07-26 17:44:44 +02:00
relation_access_tracking.c Add support for creating distributed tables with a null shard key (#6745) 2023-05-03 16:18:27 +03:00
remote_transaction.c Also reset transactions at connection shutdown (#6685) 2023-02-02 16:05:34 +01:00
transaction_management.c CDC implementation for Citus using Logical Replication (#6623) 2023-03-28 16:00:21 +05:30
transaction_recovery.c Remove useless version compats 2022-07-29 10:31:55 +02:00
worker_transaction.c PR #6728  / commit - 11 2023-03-30 11:06:16 +03:00