citus/src/include/distributed
Cédric Villemain 1dc60e38bb
Propagates GRANT/REVOKE rights on table columns (#7918)
This commit adds support for GRANT/REVOKE on table columns.

It extends propagated DDL according to this logic:
https://github.com/citusdata/citus/tree/main/src/backend/distributed#ddl

* Unchanged pre-existing behavior related to splitting ddl per relation
during propagation.
* Changed the way ACL are checked in some cases (see
`EnsureTablePermissions()` and associated commits)
* Rewrite `pg_get_table_grants` to include column grants as well
* Add missing `pfree()` in `pg_get_table_grants()`

Fixes https://github.com/citusdata/citus/issues/7287
Also check a box in https://github.com/citusdata/citus/issues/4812
2025-04-04 11:54:16 +03:00
..
commands Add failure handling for CREATE DATABASE commands (#7483) 2024-02-23 17:02:32 +00:00
metadata Fixes create user queries from Citus non-main databases with other users (#7442) 2024-01-24 12:57:54 +03:00
utils Sort includes (#7326) 2023-11-23 18:19:54 +01:00
adaptive_executor.h Refactor executor utility functions into multiple files (#6593) 2023-03-31 13:07:48 +02:00
argutils.h Add the necessary changes for rebalance strategies on enterprise (#3325) 2019-12-19 15:23:08 +01:00
backend_data.h Avoid re-assigning the global pid for client backends and bg workers when the application_name changes (#7791) 2024-12-23 14:01:53 +00:00
background_jobs.h PG16 compatibility: ruleutils and successful CREATE EXTENSION (#7087) 2023-08-02 16:04:51 +03:00
cancel_utils.h add IsHoldOffCancellationReceived utility function (#3290) 2019-12-12 17:32:59 +03:00
causal_clock.h Remove unused macros 2022-10-28 10:38:07 -07:00
citus_acquire_lock.h remove copyright years (#3286) 2019-12-11 21:14:08 +03:00
citus_clauses.h Rename master evaluation to coordinator evaluation 2020-07-07 10:37:41 +02:00
citus_custom_scan.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
citus_depended_object.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
citus_nodefuncs.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
citus_nodes.h Simplify CitusNewNode (#7434) 2024-01-22 14:55:14 +01:00
citus_ruleutils.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
citus_safe_lib.h Fix format attribute and IsLocalReplicationOriginSessionActive errors (#7055) 2023-07-13 17:41:57 +03:00
colocation_utils.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
combine_query_planner.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
commands.h Drops PG14 support (#7753) 2025-03-12 12:43:01 +03:00
comment.h Adds comment on database and role propagation (#7388) 2024-01-18 20:58:44 +03:00
connection_management.h Replace LOCAL_HOST_NAME with LocalHostName (#7449) 2024-01-24 13:50:39 +00:00
coordinator_protocol.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
cte_inline.h Remove citus.enable_cte_inlining GUC 2022-03-22 17:14:44 +01:00
deparse_shard_query.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
deparser.h Drops PG14 support (#7753) 2025-03-12 12:43:01 +03:00
directed_acyclic_graph_execution.h Fill in jobIdList field of DistributedExecution 2020-02-05 17:32:22 +00:00
distributed_deadlock_detection.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
distributed_execution_locks.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
distributed_planner.h Drops PG14 support (#7753) 2025-03-12 12:43:01 +03:00
distribution_column.h Add non-blocking variant of create_distributed_table (#6087) 2022-08-30 15:35:40 +03:00
enterprise.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
error_codes.h Issue worker messages with the same log level 2020-04-14 21:08:25 +02:00
errormessage.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
executor_util.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
extended_op_node_utils.h Fix some more master->coordinator comments 2020-07-07 10:37:53 +02:00
foreign_key_relationship.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
function_call_delegation.h Force-delegated functions' distribution argument must be reset as soon as the routine completes execution, 2022-02-17 10:48:30 -08:00
function_utils.h Semmle: Fix obvious issues (#3502) 2020-02-21 10:16:00 +01:00
hash_helpers.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
insert_select_executor.h This pull request introduces support for nonroutable merge commands in the following scenarios: 2023-06-19 12:23:40 -07:00
insert_select_planner.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
intermediate_result_pruning.h Refactor executor utility functions into multiple files (#6593) 2023-03-31 13:07:48 +02:00
intermediate_results.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
jsonbutils.h Multi tenant monitoring (#6725) 2023-04-05 17:44:17 +03:00
listutils.h Rename foreach_ macros to foreach_declared_ macros (#7700) 2025-03-12 11:01:49 +03:00
local_distributed_join_planner.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
local_executor.h Refactor executor utility functions into multiple files (#6593) 2023-03-31 13:07:48 +02:00
local_multi_copy.h Allow local execution for intermediate results in COPY 2021-02-09 15:00:06 +01:00
local_plan_cache.h Deparse/parse the local cached queries 2021-06-21 12:24:29 +03:00
locally_reserved_shared_connections.h COPY uses adaptive connection management on local node 2021-02-04 09:45:07 +01:00
lock_graph.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
log_utils.h Remove unused functions (#6220) 2022-08-22 11:53:25 +03:00
maintenanced.h Start Maintenance Daemon for Main DB at the server start. (#7254) 2023-10-30 09:44:13 +03:00
memutils.h Implementation for asycn FinishConnectionListEstablishment (#2584) 2019-03-22 17:30:42 +01:00
merge_executor.h This pull request introduces support for nonroutable merge commands in the following scenarios: 2023-06-19 12:23:40 -07:00
merge_planner.h PG17 Compatibility: Support MERGE features in Citus with clean exceptions (#7781) 2025-03-12 12:25:49 +03:00
metadata_cache.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
metadata_sync.h Drops PG14 support (#7753) 2025-03-12 12:43:01 +03:00
metadata_utility.h Propagates GRANT/REVOKE rights on table columns (#7918) 2025-04-04 11:54:16 +03:00
multi_executor.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
multi_explain.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
multi_join_order.h In the MERGE join clause, there is a datatype mismatch between target's distribution column 2023-07-27 16:06:00 -07:00
multi_logical_optimizer.h Fix union pushdown issue (#5079) 2021-07-29 13:52:55 +03:00
multi_logical_planner.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
multi_logical_replication.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
multi_partitioning_utils.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
multi_physical_planner.h remove a duplicate forward declaration and polish some comments (#7371) 2024-01-17 14:30:23 +00:00
multi_progress.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
multi_router_planner.h Fix 0-Task Plans in Single-Shard Router When Updating a Local Table with Reference Table in Subquery (#7897) 2025-03-12 12:43:01 +03:00
multi_server_executor.h This pull request introduces support for nonroutable merge commands in the following scenarios: 2023-06-19 12:23:40 -07:00
namespace_utils.h get rid of {Push/Pop}OverrideSearchPath (#7145) 2023-09-05 17:40:22 +02:00
param_utils.h Fixes: #5787 In prepared statements, map any unused parameters 2022-05-13 19:31:05 -07:00
pg_dist_background_job.h Implement infrastructure to run sql jobs in the background (#6296) 2022-09-09 16:11:19 +03:00
pg_dist_background_task.h Adds control for background task executors involving a node (#6771) 2023-04-06 14:12:39 +03:00
pg_dist_backrgound_task_depend.h Implement infrastructure to run sql jobs in the background (#6296) 2022-09-09 16:11:19 +03:00
pg_dist_cleanup.h 'Deferred Drop' and robust 'Shard Cleanup' for Splits. (#6258) 2022-09-06 12:11:20 -07:00
pg_dist_colocation.h Add distributioncolumncollation to to pg_dist_colocation 2019-12-09 19:51:40 +00:00
pg_dist_local_group.h Remove copyright years (#2918) 2019-10-15 17:44:30 +03:00
pg_dist_node.h Replace master with citus in logs and comments (#5210) 2021-08-26 11:31:17 +03:00
pg_dist_node_metadata.h MERGE: Support reference table as source with local table as target 2023-05-02 11:37:29 -07:00
pg_dist_partition.h Dont auto-undistribute user-added citus local tables (#5314) 2021-10-28 12:10:26 +03:00
pg_dist_placement.h Fix some more master->coordinator comments 2020-07-07 10:37:53 +02:00
pg_dist_rebalance_strategy.h Implement an improvement threshold in the rebalancer (#4927) 2021-05-11 14:24:59 +02:00
pg_dist_schema.h Rename pg_dist tenant_schema to pg_dist_schema (#7001) 2023-06-14 12:12:15 +03:00
pg_dist_shard.h Remove cstore_fdw-related logic 2021-11-16 13:59:03 +01:00
pg_dist_transaction.h Adds 2PC distributed commands from other databases (#7203) 2023-12-22 19:19:41 +03:00
placement_access.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
placement_connection.h Drop support for Inactive Shard placements 2021-10-22 18:03:35 +02:00
priority.h Support changing CPU priorities for backends and shard moves (#6126) 2022-08-16 13:07:17 +03:00
query_colocation_checker.h [Bug Fix] : writing incorrect data to target Merge repartition Command (#7659) 2024-09-12 21:16:39 -07:00
query_pushdown_planning.h Adds JSON_TABLE() support, and SQL/JSON constructor/query functions tests (#7816) 2025-03-12 12:26:05 +03:00
query_stats.h PG 15 Compat: Resolve compile issues + shmem requests 2022-07-15 10:11:39 +02:00
query_utils.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
recursive_planning.h Enhance MERGE .. WHEN NOT MATCHED BY SOURCE for repartitioned source (#7900) 2025-03-12 12:43:01 +03:00
reference_table_utils.h PR #6728  / commit - 5 2023-03-30 10:53:22 +03:00
relation_access_tracking.h Detach relation access tracking from connection management 2022-07-28 11:27:59 +02:00
relation_restriction_equivalence.h PG16 compatibility - one more outer join check (#7126) 2023-08-17 19:07:18 +03:00
relation_utils.h move pg_version_constants.h to toplevel include (#7335) 2023-11-09 15:09:39 +00:00
relay_utility.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
remote_commands.h CDC implementation for Citus using Logical Replication (#6623) 2023-03-28 16:00:21 +05:30
remote_transaction.h Add support for create / drop database propagation from non-main databases (#7439) 2024-02-21 10:44:01 +00:00
repartition_executor.h Enhance MERGE .. WHEN NOT MATCHED BY SOURCE for repartitioned source (#7900) 2025-03-12 12:43:01 +03:00
repartition_join_execution.h Enable re-partition joins after local execution 2022-02-23 19:40:21 +01:00
replicate_none_dist_table_shard.h Not undistribute Citus local table when converting it to a reference table / single-shard table 2023-08-29 12:57:28 +03:00
replication_origin_session_utils.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
resource_lock.h Change StaticAssertStmt for node-wide objects to pg17 2025-03-13 15:13:56 +03:00
run_from_same_connection.h Remove copyright years (#2918) 2019-10-15 17:44:30 +03:00
serialize_distributed_ddls.h Support CREATE / DROP database commands from any node (#7359) 2024-01-08 16:47:49 +00:00
shard_cleaner.h Add failure handling for CREATE DATABASE commands (#7483) 2024-02-23 17:02:32 +00:00
shard_pruning.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
shard_rebalancer.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
shard_split.h 'Deferred Drop' and robust 'Shard Cleanup' for Splits. (#6258) 2022-09-06 12:11:20 -07:00
shard_transfer.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
shard_utils.h Switch to sequential mode on long partition names 2021-04-14 15:27:50 +03:00
shardinterval_utils.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
shardsplit_logical_replication.h Add non-blocking variant of create_distributed_table (#6087) 2022-08-30 15:35:40 +03:00
shardsplit_shared_memory.h Share more code between splits and moves (#6152) 2022-08-15 20:21:51 +03:00
shared_connection_stats.h PG 15 Compat: Resolve compile issues + shmem requests 2022-07-15 10:11:39 +02:00
shared_library_init.h PG16 compatibility: ruleutils and successful CREATE EXTENSION (#7087) 2023-08-02 16:04:51 +03:00
statistics_collection.h Remove copyright years (#2918) 2019-10-15 17:44:30 +03:00
string_utils.h Make enterprise features open source (#6008) 2022-06-16 00:23:46 -07:00
subplan_execution.h Locally execute queries that don't need any data access (#3410) 2020-01-23 18:28:34 +01:00
task_execution_utils.h Remove task tracker executor (#3850) 2020-07-18 13:11:36 +03:00
tdigest_extension.h Feature: tdigest aggregate (#3897) 2020-06-12 13:50:28 +02:00
tenant_schema_metadata.h Make citus_stat_tenants work with schema-based tenants. (#6936) 2023-06-13 14:11:45 +03:00
time_constants.h refactor some of hard coded values in citus gucs (#3137) 2019-10-30 10:35:39 +03:00
transaction_identifier.h Remove copyright years (#2918) 2019-10-15 17:44:30 +03:00
transaction_management.h Adds REASSIGN OWNED BY propagation (#7319) 2023-12-28 15:15:58 +03:00
transaction_recovery.h Adds 2PC distributed commands from other databases (#7203) 2023-12-22 19:19:41 +03:00
transmit.h Create directories and files with pg_file_create_mode and pg_dir_create_mode permissions (#7479) 2024-02-07 12:48:31 +01:00
tuple_destination.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
tuplestore.h Remove copyright years (#2918) 2019-10-15 17:44:30 +03:00
type_utils.h This implements a new UDF citus_get_cluster_clock() that returns a monotonically 2022-10-28 10:15:08 -07:00
version_compat.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
worker_create_or_replace.h Propagate CREATE PUBLICATION statements 2023-03-29 00:59:12 +02:00
worker_log_messages.h Issue worker messages with the same log level 2020-04-14 21:08:25 +02:00
worker_manager.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
worker_protocol.h Sort includes (#7326) 2023-11-23 18:19:54 +01:00
worker_shard_copy.h Exclude-Generated-Columns-In-Copy (#6721) 2023-03-07 18:15:50 +03:00
worker_shard_visibility.h Convert citus.hide_shards_from_app_name_prefixes to citus.show_shards_for_app_name_prefixes 2022-05-03 14:22:13 +02:00
worker_transaction.h Fixes create user queries from Citus non-main databases with other users (#7442) 2024-01-24 12:57:54 +03:00