citus/src/backend/distributed/commands
Burak Velioglu 81a6cb47d6
Merge branch 'master' into velioglu/table_wo_seq_prototype
2021-12-22 11:24:40 +03:00
..
README.md Fix typos. Spurred spotting "connectios" in logs 2021-10-25 13:54:09 +00:00
alter_table.c Dont auto-undistribute user-added citus local tables (#5314) 2021-10-28 12:10:26 +03:00
call.c Allow delegating function from worker nodes 2021-12-06 19:25:51 +03:00
cascade_table_operation_for_connected_relations.c Dont auto-undistribute user-added citus local tables (#5314) 2021-10-28 12:10:26 +03:00
citus_add_local_table_to_metadata.c Object distribution change 2021-12-22 11:19:34 +03:00
cluster.c Pass ProcessUtilityContext to .preprocess 2021-01-14 17:12:00 +03:00
collation.c Sync pg_dist_object on an update and propagate while syncing to a new node 2021-12-06 19:25:50 +03:00
create_distributed_table.c Move shell table creation out 2021-12-18 21:28:24 +03:00
database.c Feature: alter database owner (#4986) 2021-05-20 13:27:44 +02:00
dependencies.c Add todos 2021-12-20 15:44:01 +03:00
distribute_object_ops.c Sync pg_dist_object on an update and propagate while syncing to a new node 2021-12-06 19:25:50 +03:00
drop_distributed_table.c Prevent cache usage on citus_drop_trigger codepaths 2021-11-18 20:24:51 +03:00
extension.c Sync pg_dist_object on an update and propagate while syncing to a new node 2021-12-06 19:25:50 +03:00
foreign_constraint.c Remove get_relation_constraint_oid_compat 2021-10-11 11:53:00 +03:00
function.c Do not include return table params in the function arg list 2021-12-21 19:01:42 +03:00
grant.c Pass ProcessUtilityContext to .preprocess 2021-01-14 17:12:00 +03:00
index.c Fix drop index trying to drop coordinator local indexes on metadata worker nodes 2021-12-14 11:28:08 +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 Remove copy into new append shard logic 2021-11-07 21:01:40 +01:00
policy.c Pass ProcessUtilityContext to .preprocess 2021-01-14 17:12:00 +03:00
rename.c Rename ddlJob->commandString to ddlJob->metadataSyncCommand 2021-10-29 23:45:43 +03:00
role.c Sync pg_dist_object on an update and propagate while syncing to a new node 2021-12-06 19:25:50 +03:00
schema.c Sync pg_dist_object on an update and propagate while syncing to a new node 2021-12-06 19:25:50 +03:00
sequence.c Fix typos. Spurred spotting "connectios" in logs 2021-10-25 13:54:09 +00:00
statistics.c Fixes ALTER STATISTICS IF EXISTS bug (#5435) 2021-11-04 16:14:05 +03:00
subscription.c Remove copyright years (#2918) 2019-10-15 17:44:30 +03:00
table.c Sync pg_dist_object on an update and propagate while syncing to a new node 2021-12-06 19:25:50 +03:00
transmit.c Fix unlimited copy size variable's value 2021-09-03 15:41:28 +03:00
trigger.c Rename ddlJob->commandString to ddlJob->metadataSyncCommand 2021-10-29 23:45:43 +03:00
truncate.c Fix typos. Spurred spotting "connectios" in logs 2021-10-25 13:54:09 +00:00
type.c Sync pg_dist_object on an update and propagate while syncing to a new node 2021-12-06 19:25:50 +03:00
utility_hook.c Propagate SET TRANSACTION commands 2021-12-18 11:31:39 +01:00
vacuum.c Drop support for citus.multi_shard_commit_protocol (#5380) 2021-10-21 14:01:28 +02:00
variableset.c Propagate SET TRANSACTION commands 2021-12-18 11:31:39 +01: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 helper functions for foreign key constraints
grant.c Placeholder for code granting users access to relations, implemented as enterprise feature
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.