citus/src/backend/distributed/commands
Önder Kalacı 90b1afe31e
Merge branch 'main' into baby_step_pg_15
2022-07-18 15:02:39 +02:00
..
README.md Make enterprise features open source (#6008) 2022-06-16 00:23:46 -07:00
alter_table.c we should check if relation is valid after fetching a relation 2022-07-06 16:35:01 +03:00
call.c Add caching for functions that check the backend type 2022-05-20 19:02:37 +02:00
cascade_table_operation_for_connected_relations.c Fix matviews for citus_add_local_table_to_metadata (#6023) 2022-07-04 17:00:07 +03:00
citus_add_local_table_to_metadata.c we should check if relation is valid after fetching a relation 2022-07-06 16:35:01 +03:00
citus_global_signal.c Allow distributed execution from run_command_on_* functions 2022-05-20 15:26:47 +02:00
cluster.c Make enterprise features open source (#6008) 2022-06-16 00:23:46 -07:00
collation.c Refactor: reduce complexity and code duplication for Object Propagation 2022-05-18 15:58:28 +02:00
common.c Refactor: reduce complexity and code duplication for Object Propagation 2022-05-18 15:58:28 +02:00
create_distributed_table.c Revert "Creates new colocation for colocate_with:='none' too" 2022-05-17 15:32:22 +03:00
database.c Make enterprise features open source (#6008) 2022-06-16 00:23:46 -07:00
dependencies.c Make enterprise features open source (#6008) 2022-06-16 00:23:46 -07:00
distribute_object_ops.c propagate unqualified vacuum and analyze to all worker nodes 2022-06-23 15:33:14 +03:00
domain.c Refactor: reduce complexity and code duplication for Object Propagation 2022-05-18 15:58:28 +02:00
drop_distributed_table.c Revert "Creates new colocation for colocate_with:='none' too" 2022-05-17 15:32:22 +03:00
extension.c Support citus_columnar as separate extension (#5911) 2022-07-13 21:08:29 -07:00
foreign_constraint.c Fix an incorrect error message related with fkeys between replicated dist tables (#5796) 2022-03-14 14:34:09 +01:00
foreign_data_wrapper.c PG 15 Compat: Resolve compile issues + shmem requests 2022-07-15 10:11:39 +02:00
foreign_server.c Make enterprise features open source (#6008) 2022-06-16 00:23:46 -07:00
function.c PG 15 Compat: Resolve compile issues + shmem requests 2022-07-15 10:11:39 +02:00
grant.c Make enterprise features open source (#6008) 2022-06-16 00:23:46 -07:00
index.c we should check if relation is valid after fetching a relation 2022-07-06 16:35:01 +03:00
index_pg_source.c Fix Semmle errors (#4636) 2021-02-08 18:37:44 +03:00
local_multi_copy.c Fix style 2021-09-03 16:09:59 +03:00
multi_copy.c Shard Split for Citus (#6029) 2022-07-18 02:54:15 -07:00
policy.c PG 15 Compat: Resolve compile issues + shmem requests 2022-07-15 10:11:39 +02:00
rename.c * alter index/table rename weird syntax supported, 2022-07-04 21:27:47 +03:00
role.c Make enterprise features open source (#6008) 2022-06-16 00:23:46 -07:00
schema.c Make enterprise features open source (#6008) 2022-06-16 00:23:46 -07:00
sequence.c PG 15 Compat: Resolve compile issues + shmem requests 2022-07-15 10:11:39 +02:00
statistics.c we should check if relation is valid after fetching a relation 2022-07-06 16:35:01 +03:00
subscription.c PG 15 Compat: Resolve compile issues + shmem requests 2022-07-15 10:11:39 +02:00
table.c Make enterprise features open source (#6008) 2022-06-16 00:23:46 -07:00
text_search.c Refactor: reduce complexity and code duplication for Object Propagation 2022-05-18 15:58:28 +02:00
trigger.c Use object address instead of relation id on DDLJob to decide on syncing metadata 2022-05-05 17:59:44 +03:00
truncate.c Add distributing lock command support 2022-05-20 12:28:07 +03:00
type.c Refactor: reduce complexity and code duplication for Object Propagation 2022-05-18 15:58:28 +02:00
utility_hook.c Support citus_columnar as separate extension (#5911) 2022-07-13 21:08:29 -07:00
vacuum.c auto is a valid option for vacuum index_cleanup. 2022-07-04 19:27:55 +03:00
variableset.c Hide shards from application_name's with a specific prefix 2022-01-18 15:20:55 +04:00
view.c Fix dropping temporary view without specifying the explicit schema name (#6003) 2022-06-15 16:41:12 +02:00

README.md

Commands

The commands module is modeled after backend/commands from the postgres repository and contains the logic for Citus on how to run these commands on distributed objects. Even though the structure of the directory has some resemblence to its postgres relative, files here are somewhat more fine-grained. This is due to the nature of citus commands that are heavily focused on distributed tables. Instead of having all commands in tablecmds.c they are often moved to files that are named after the command.

File Description
create_distributed_table.c Implementation of UDF's for creating distributed tables
drop_distributed_table.c Implementation for dropping metadata for partitions of distributed tables
extension.c Implementation of CREATE EXTENSION commands for citus specific checks
foreign_constraint.c Implementation of and helper functions for foreign key constraints
grant.c Implementation of GRANT commands for roles/users on relations
index.c Implementation of commands specific to indices on distributed tables
multi_copy.c Implementation of COPY command. There are multiple different copy modes which are described in detail below
policy.c Implementation of CREATE\ALTER POLICY commands.
rename.c Implementation of ALTER ... RENAME ... commands. It implements the renaming of applicable objects, otherwise provides the user with a warning
schema.c
sequence.c Implementation of CREATE/ALTER SEQUENCE commands. Primarily checks correctness of sequence statements as they are not propagated to the worker nodes
table.c
transmit.c Implementation of COPY commands with format transmit set in the options. This format is used to transfer files from one node to another node
truncate.c Implementation of TRUNCATE commands on distributed tables
utility_hook.c This is the entry point from postgres into the commands module of citus. It contains the implementation that gets registered in postgres' ProcessUtility_hook callback to extends the functionality of the original ProcessUtility. This code is used to route the incoming commands to their respective implementation in Citus
vacuum.c Implementation of VACUUM commands on distributed tables

COPY

The copy command is overloaded for a couple of use-cases specific to citus. The syntax of the command stays the same, however the implementation might slightly differ from the stock implementation. The overloading is mostly done via extra options that Citus uses to indicate how to operate the copy. The options used are described below.

FORMAT transmit

Implemented in transmit.c

TODO: to be written by someone with enough knowledge to write how, when and why it is used.

FORMAT result

Implemented in multi_copy.c

TODO: to be written by someone with enough knowledge to write how, when and why it is used.