citus/src/include/distributed
Onder Kalaci af448da1a7 Prevent failures on partitioned distributed tables with statistics objects on PG 15
Comment from the code is clear on this:
/*
 * The statistics objects of the distributed table are not relevant
 * for the distributed planning, so we can override it.
 *
 * Normally, we should not need this. However, the combination of
 * Postgres commit 269b532aef55a579ae02a3e8e8df14101570dfd9 and
 * Citus function AdjustPartitioningForDistributedPlanning()
 * forces us to do this. The commit expects statistics objects
 * of partitions to have "inh" flag set properly. Whereas, the
 * function overrides "inh" flag. To avoid Postgres to throw error,
 * we override statlist such that Postgres does not try to process
 * any statistics objects during the standard_planner() on the
 * coordinator. In the end, we do not need the standard_planner()
 * on the coordinator to generate an optimized plan. We call
 * into standard_planner() for other purposes, such as generating the
 * relationRestrictionContext here.
 *
 * AdjustPartitioningForDistributedPlanning() is a hack that we use
 * to prevent Postgres' standard_planner() to expand all the partitions
 * for the distributed planning when a distributed partitioned table
 * is queried. It is required for both correctness and performance
 * reasons. Although we can eliminate the use of the function for
 * the correctness (e.g., make sure that rest of the planner can handle
 * partitions), it's performance implication is hard to avoid. Certain
 * planning logic of Citus (such as router or query pushdown) relies
 * heavily on the relationRestrictionList. If
 * AdjustPartitioningForDistributedPlanning() is removed, all the
 * partitions show up in the, causing high planning times for
 * such queries.
 */
2022-09-15 14:37:28 +03:00
..
commands Remove unused functions (#6220) 2022-08-22 11:53:25 +03:00
metadata added citus_depended_objects udf and HideCitusDependentObjects GUC to hide citus depended objects from pg meta queries (#6055) 2022-07-25 16:43:34 +03:00
utils Add non-blocking variant of create_distributed_table (#6087) 2022-08-30 15:35:40 +03:00
adaptive_executor.h Use intermediate results for re-partition joins 2022-02-23 19:40:21 +01:00
argutils.h Add the necessary changes for rebalance strategies on enterprise (#3325) 2019-12-19 15:23:08 +01:00
backend_data.h Address race condition in InitializeBackendData (#6285) 2022-09-02 14:23:47 +02:00
background_jobs.h Feature: run rebalancer in the background (#6215) 2022-09-12 20:46:53 +03:00
cancel_utils.h add IsHoldOffCancellationReceived utility function (#3290) 2019-12-12 17:32:59 +03: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 Do not execute subplans multiple times with cursors 2020-11-20 10:43:56 +01:00
citus_depended_object.h we consider stat object as invalid if it is not owned by current user (#6130) 2022-08-09 20:59:30 +03:00
citus_nodefuncs.h refactor table ddl events scoped for shards (#4342) 2020-11-26 13:31:59 +01:00
citus_nodes.h refactor table ddl events scoped for shards (#4342) 2020-11-26 13:31:59 +01:00
citus_ruleutils.h Adds support for unlogged distributed sequences (#6292) 2022-09-13 10:53:39 +03:00
citus_safe_lib.h Introduce Non-Blocking Shard Split Workflow 2022-08-04 16:32:38 +02:00
colocation_utils.h Add non-blocking variant of create_distributed_table (#6087) 2022-08-30 15:35:40 +03:00
combine_query_planner.h verify shards if exists for insert, delete, update (#6280) 2022-09-06 15:29:14 +02:00
commands.h Adds support for unlogged distributed sequences (#6292) 2022-09-13 10:53:39 +03:00
connection_management.h Introduce Non-Blocking Shard Split Workflow 2022-08-04 16:32:38 +02:00
coordinator_protocol.h Remove do_repair option from citus_copy_shard_placement (#6299) 2022-09-09 15:44:30 +02:00
cte_inline.h Remove citus.enable_cte_inlining GUC 2022-03-22 17:14:44 +01:00
deparse_shard_query.h Fix missing from entry 2021-11-04 18:54:52 +03:00
deparser.h Adds support for unlogged distributed sequences (#6292) 2022-09-13 10:53:39 +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 Remove copyright years (#2918) 2019-10-15 17:44:30 +03:00
distributed_execution_locks.h Unify distributed execution logic for single replicated tables 2021-11-08 13:52:20 +01:00
distributed_planner.h Prevent failures on partitioned distributed tables with statistics objects on PG 15 2022-09-15 14:37:28 +03:00
distribution_column.h Add non-blocking variant of create_distributed_table (#6087) 2022-08-30 15:35:40 +03:00
enterprise.h remove copyright years (#3286) 2019-12-11 21:14:08 +03:00
error_codes.h Issue worker messages with the same log level 2020-04-14 21:08:25 +02:00
errormessage.h Make enterprise features open source (#6008) 2022-06-16 00:23:46 -07:00
extended_op_node_utils.h Fix some more master->coordinator comments 2020-07-07 10:37:53 +02:00
foreign_key_relationship.h Use CreateSimpleHash (and variants) whenever possible (#6177) 2022-08-17 13:01:59 +03: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 Use CreateSimpleHash (and variants) whenever possible (#6177) 2022-08-17 13:01:59 +03:00
insert_select_executor.h Fix issues with insert..select casts and column ordering 2022-07-28 13:23:57 +02:00
insert_select_planner.h Move more from insert_select_executor to insert_select_planner 2020-06-26 08:08:26 -07:00
intermediate_result_pruning.h Feature: localhost guc (#4836) 2021-05-12 16:59:44 +02:00
intermediate_results.h Shard Split for Citus (#6029) 2022-07-18 02:54:15 -07:00
jsonbutils.h Fix node adding itself with citus_add_node leading to deadlock (Fix #5720) (#5758) 2022-03-10 17:46:33 +03:00
listutils.h Remove useless version compats 2022-07-29 10:31:55 +02:00
local_distributed_join_planner.h Add more tests 2020-12-15 18:18:36 +03:00
local_executor.h Improve nested execution checks and add GUC to disable 2022-05-20 18:55:43 +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 Dumping wait edges becomes optionally scan all backends 2022-02-21 17:37:07 +01:00
log_utils.h Remove unused functions (#6220) 2022-08-22 11:53:25 +03:00
maintenanced.h PG 15 Compat: Resolve compile issues + shmem requests 2022-07-15 10:11:39 +02:00
memutils.h Implementation for asycn FinishConnectionListEstablishment (#2584) 2019-03-22 17:30:42 +01:00
metadata_cache.h Implement infrastructure to run sql jobs in the background (#6296) 2022-09-09 16:11:19 +03:00
metadata_sync.h Add non-blocking variant of create_distributed_table (#6087) 2022-08-30 15:35:40 +03:00
metadata_utility.h Feature: run rebalancer in the background (#6215) 2022-09-12 20:46:53 +03:00
multi_client_executor.h Remove unused functions that cppcheck found 2020-10-19 13:50:52 +03:00
multi_executor.h Introduce GUC citus.skip_constraint_validation (#6281) 2022-09-08 18:13:18 +03:00
multi_explain.h Sort explain analyze output by task time 2020-09-24 11:38:40 +03:00
multi_join_order.h Rename ForceXxx functions to to XxxOrError 2020-09-01 11:19:17 +02:00
multi_logical_optimizer.h Fix union pushdown issue (#5079) 2021-07-29 13:52:55 +03:00
multi_logical_planner.h Drop postgres 12 support (#6040) 2022-07-20 17:49:36 +03:00
multi_logical_replication.h Share more replication code between moves and splits (#6310) 2022-09-09 16:45:38 +02:00
multi_partitioning_utils.h Add non-blocking variant of create_distributed_table (#6087) 2022-08-30 15:35:40 +03:00
multi_physical_planner.h Remove unused reduceQuery from physical planning (#6221) 2022-08-24 17:24:27 +00:00
multi_progress.h Avoid two race conditions in the rebalance progress monitor (#5050) 2021-06-21 14:03:42 +00:00
multi_router_planner.h Only consider pseudo constants for shortcuts (#4712) 2021-02-15 18:39:37 +03:00
multi_server_executor.h Fix typos. Spurred spotting "connectios" in logs 2021-10-25 13:54:09 +00:00
namespace_utils.h Implement PushOverrideEmptySearchPath (#3874) 2020-06-05 19:23:59 +03: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 Implement infrastructure to run sql jobs in the background (#6296) 2022-09-09 16:11:19 +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 Remove copyright years (#2918) 2019-10-15 17:44:30 +03: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_shard.h Remove cstore_fdw-related logic 2021-11-16 13:59:03 +01:00
pg_dist_transaction.h Remove copyright years (#2918) 2019-10-15 17:44:30 +03:00
pg_version_constants.h Pg15 support (#6085) 2022-08-24 17:59:17 +02:00
placement_access.h Remove real time router executors (#3142) 2019-11-05 12:48:10 +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 Refactor WrapRteRelationIntoSubquery 2020-12-15 18:18:36 +03:00
query_pushdown_planning.h Revert "Support JSON_TABLE on PG 15 (#6241)" 2022-09-12 15:20:17 +03:00
query_stats.h PG 15 Compat: Resolve compile issues + shmem requests 2022-07-15 10:11:39 +02:00
query_utils.h Fix partition column index issue (#4591) 2021-01-29 14:40:40 +03:00
recursive_planning.h Drop postgres 11 support 2021-03-25 09:20:28 +03:00
reference_table_utils.h Feature: run rebalancer in the background (#6215) 2022-09-12 20:46:53 +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 Fix union pushdown issue (#5079) 2021-07-29 13:52:55 +03:00
relation_utils.h Refactor PreprocessIndexStmt (#4272) 2020-11-25 12:19:37 +03:00
relay_utility.h Drop support for Inactive Shard placements 2021-10-22 18:03:35 +02:00
remote_commands.h Allow distributed execution from run_command_on_* functions 2022-05-20 15:26:47 +02:00
remote_transaction.h Remove unused functions that cppcheck found 2020-10-19 13:50:52 +03:00
repartition_join_execution.h Enable re-partition joins after local execution 2022-02-23 19:40:21 +01:00
resource_lock.h Implement infrastructure to run sql jobs in the background (#6296) 2022-09-09 16:11:19 +03:00
run_from_same_connection.h Remove copyright years (#2918) 2019-10-15 17:44:30 +03:00
shard_cleaner.h Implement infrastructure to run sql jobs in the background (#6296) 2022-09-09 16:11:19 +03:00
shard_pruning.h Enable citus-local distributed table joins 2020-12-15 18:17:10 +03:00
shard_rebalancer.h Show citus_copy_shard_placement progress in get_rebalance_progress (#6322) 2022-09-13 08:59:52 +00:00
shard_split.h 'Deferred Drop' and robust 'Shard Cleanup' for Splits. (#6258) 2022-09-06 12:11:20 -07:00
shard_transfer.h Remove do_repair option from citus_copy_shard_placement (#6299) 2022-09-09 15:44:30 +02:00
shard_utils.h Switch to sequential mode on long partition names 2021-04-14 15:27:50 +03:00
shardinterval_utils.h Remove unused functions that cppcheck found 2020-10-19 13:50:52 +03: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 we supress notice log during looking up function oid to not break pg vanilla tests. (#6082) 2022-08-01 10:14:35 +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
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 Improve nested execution checks and add GUC to disable 2022-05-20 18:55:43 +02:00
transaction_recovery.h Delete transactions when removing node 2020-12-07 11:35:20 +03:00
transmit.h Remove old re-partitioning functions 2022-04-04 18:11:52 +02:00
tuple_destination.h Local execution considers intermediate result size limit 2020-10-15 17:18:55 +02:00
tuplestore.h Remove copyright years (#2918) 2019-10-15 17:44:30 +03:00
version_compat.h Drop postgres 12 support (#6040) 2022-07-20 17:49:36 +03:00
worker_create_or_replace.h Add support for TEXT SEARCH CONFIGURATION objects (#5685) 2022-02-17 13:12:46 +01:00
worker_log_messages.h Issue worker messages with the same log level 2020-04-14 21:08:25 +02:00
worker_manager.h Add non-blocking variant of create_distributed_table (#6087) 2022-08-30 15:35:40 +03:00
worker_protocol.h Remove old re-partitioning functions 2022-04-04 18:11:52 +02:00
worker_shard_copy.h Shard Split for Citus (#6029) 2022-07-18 02:54:15 -07: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 Remove unused functions (#6220) 2022-08-22 11:53:25 +03:00