citus/src/backend/distributed
Onder Kalaci a333c9f16c Add infrastructure for distributed deadlock detection
This commit adds all the necessary pieces to do the distributed
deadlock detection.

Each distributed transaction is already assigned with distributed
transaction ids introduced with
3369f3486f. The dependency among the
distributed transactions are gathered with
80ea233ec1.

With this commit, we implement a DFS (depth first seach) on the
dependency graph and search for cycles. Finding a cycle reveals
a distributed deadlock.

Once we find the deadlock, we examine the path that the cycle exists
and cancel the youngest distributed transaction.

Note that, we're not yet enabling the deadlock detection by default
with this commit.
2017-08-12 13:28:37 +03:00
..
commands Fix locking in create_distributed_table 2017-08-11 11:34:33 +03:00
connection Add API for waiting for multiple connections 2017-08-11 00:03:06 +02:00
executor Disallow task-tracker queries on follower clusters 2017-08-12 11:47:31 +02:00
master Add citus_create_restore_point for distributed snapshots 2017-08-11 07:36:20 +02:00
metadata Create citus.use_secondary_nodes GUC 2017-08-10 17:37:17 +03:00
planner Correct planner and add more tests 2017-08-11 10:16:13 +03:00
progress Add Progress Tracking Infrastructure 2017-07-26 14:12:15 +03:00
relay Add distributed partitioned table support distributed table creation 2017-08-09 10:01:35 +03:00
test Remove test_helper_functions.h inclusions 2017-08-10 12:42:46 +03:00
transaction Add infrastructure for distributed deadlock detection 2017-08-12 13:28:37 +03:00
utils Fix locking in create_distributed_table 2017-08-11 11:34:33 +03:00
worker Ensure we are allowing partitioned tables at all appropriate places 2017-08-09 10:01:35 +03:00
.gitignore Change logicalrelid type in pg_dist_partition and pg_dist_shard to regclass 2016-10-03 20:27:16 +02:00
Makefile Add infrastructure for distributed deadlock detection 2017-08-12 13:28:37 +03:00
citus--5.0--5.0-1.sql Remove unused master_stage_shard_{placement_,}row 2017-03-07 11:59:26 +03:00
citus--5.0-1--5.0-2.sql Add COPY support on worker nodes for append partitioned relations 2016-05-03 16:00:00 +03:00
citus--5.0-2--5.1-1.sql Stamp 5.1 release. 2016-05-04 18:05:41 -07:00
citus--5.1-1--5.1-2.sql ADD master_modify_multiple_shards UDF 2016-05-26 17:30:35 +03:00
citus--5.1-2--5.1-3.sql Drop function from public and create in pg_catalog 2016-06-16 14:08:40 -07:00
citus--5.1-3--5.1-4.sql Change worker_apply_shard_ddl_command to accept schema name as parameter 2016-07-21 14:17:26 +03:00
citus--5.1-4--5.1-5.sql Fix worker_fetch_regular_table with schema 2016-07-22 00:44:02 -06:00
citus--5.1-5--5.1-6.sql Add old version(without schema name parameter) of api functions back 2016-07-28 20:40:38 +03:00
citus--5.1-6--5.1-7.sql Remove schema name parameter from API functions 2016-07-28 20:41:05 +03:00
citus--5.1-7--5.1-8.sql Support SERIAL/BIGSERIAL non-partition columns 2016-07-28 23:55:40 -06:00
citus--5.1-8--5.2-1.sql Bump version numbers for 5.2 release 2016-08-01 13:48:24 -07:00
citus--5.2-1--5.2-2.sql Add UDF master_expire_table_cache 2016-09-28 12:08:37 +03:00
citus--5.2-2--5.2-3.sql Add UDF master_expire_table_cache 2016-09-28 12:08:37 +03:00
citus--5.2-3--5.2-4.sql Internal co-location API 2016-09-29 11:56:53 +03:00
citus--5.2-4--6.0-1.sql Change logicalrelid type in pg_dist_partition and pg_dist_shard to regclass 2016-10-03 20:27:16 +02:00
citus--6.0-1--6.0-2.sql Provides safe, idempotent shard-extended names to any object name 2016-10-03 17:02:34 -04:00
citus--6.0-2--6.0-3.sql Add replication model column to pg_dist_partition 2016-10-05 01:14:28 +02:00
citus--6.0-3--6.0-4.sql Switch from pg_worker_list.conf file to pg_dist_node metadata table. 2016-10-05 13:01:35 +03:00
citus--6.0-4--6.0-5.sql Add worker transaction and transaction recovery infrastructure 2016-10-18 14:18:14 +03:00
citus--6.0-5--6.0-6.sql Drop shardalias 2016-10-14 11:03:26 +03:00
citus--6.0-6--6.0-7.sql Add pg_dist_local_group Metadata Table 2016-10-14 11:41:14 +03:00
citus--6.0-7--6.0-8.sql Drop shardalias 2016-10-14 11:03:26 +03:00
citus--6.0-8--6.0-9.sql Add worker transaction and transaction recovery infrastructure 2016-10-18 14:18:14 +03:00
citus--6.0-9--6.0-10.sql Add worker transaction and transaction recovery infrastructure 2016-10-18 14:18:14 +03:00
citus--6.0-10--6.0-11.sql Final refactoring 2016-10-20 11:29:11 +03:00
citus--6.0-11--6.0-12.sql Add create_reference_table() 2016-10-20 15:29:30 +03:00
citus--6.0-12--6.0-13.sql Foreign Constraint Support for create_distributed_table and shard move 2016-10-21 15:38:55 +03:00
citus--6.0-13--6.0-14.sql Move all funcs to pg_catalog, add test to verify 2016-10-25 12:45:53 -06:00
citus--6.0-14--6.0-15.sql Invalidate relcache after pg_dist_shard_placement changes. 2016-10-26 03:36:35 -07:00
citus--6.0-15--6.0-16.sql Add mark_tables_colocated() to update colocation groups 2016-10-26 17:29:03 +03:00
citus--6.0-16--6.0-17.sql Add stub for Copy shard placement 2016-10-26 17:57:55 +03:00
citus--6.0-17--6.0-18.sql Add Column Definition List for Output Columns for master_add_node 2016-11-07 14:08:58 -08:00
citus--6.0-18--6.1-1.sql Add start_metadata_sync_to_node UDF 2016-12-13 10:48:03 +03:00
citus--6.1-1--6.1-2.sql Make truncate triggers propagated on start_metadata_sync_to_node call 2016-12-14 10:53:10 +03:00
citus--6.1-2--6.1-3.sql Add stop_metadata_sync_to_node UDF 2016-12-14 10:53:12 +03:00
citus--6.1-3--6.1-4.sql Expose the column_to_column_name UDF to make partkey in pg_dist_partition human-readable 2016-12-14 10:46:33 +01:00
citus--6.1-4--6.1-5.sql Add colocate_with option to create_distributed_table() 2016-12-16 14:53:35 +02:00
citus--6.1-5--6.1-6.sql Add get_distribution_value_shardid UDF (#1048) 2016-12-22 12:17:08 +03:00
citus--6.1-6--6.1-7.sql Add get_distribution_value_shardid UDF (#1048) 2016-12-22 12:17:08 +03:00
citus--6.1-7--6.1-8.sql Add shard locking UDFs 2016-12-22 11:04:34 +01:00
citus--6.1-8--6.1-9.sql GRANT SELECT access for metadata tables to public 2016-12-23 16:32:47 +03:00
citus--6.1-9--6.1-10.sql GRANT SELECT access for metadata tables to public 2016-12-23 16:32:47 +03:00
citus--6.1-10--6.1-11.sql Prevent Deadlock on Dropping MX Tables with Sequences 2016-12-28 16:32:20 +03:00
citus--6.1-11--6.1-12.sql Add upgrade_to_reference_table 2017-01-02 17:54:42 +02:00
citus--6.1-12--6.1-13.sql Add master_disable_node UDF 2017-01-10 10:54:57 +03:00
citus--6.1-13--6.1-14.sql Add citus tools to default configuration 2017-01-10 17:53:27 +03:00
citus--6.1-14--6.1-15.sql Create Invalidation Trigger for pg_dist_local_group Table Updates 2017-01-18 09:43:38 +03:00
citus--6.1-15--6.1-16.sql Add Sequence Support for MX Tables 2017-01-18 09:43:38 +03:00
citus--6.1-16--6.1-17.sql Add worker_hash() and a stub for isolate_tenant_to_new_shard() 2017-01-20 14:38:01 +02:00
citus--6.1-17--6.2-1.sql Remove unused master_stage_shard_{placement_,}row 2017-03-07 11:59:26 +03:00
citus--6.2-1--6.2-2.sql Size UDFs implemented 2017-03-16 13:50:30 +03:00
citus--6.2-2--6.2-3.sql Set default value of isactive to true 2017-04-18 09:40:44 +03:00
citus--6.2-3--6.2-4.sql Honour enable_ddl_propagation in truncate trigger 2017-04-29 03:32:52 +02:00
citus--6.2-4--7.0-1.sql Bump extension and configure PACKAGE versions 2017-05-17 15:25:30 -06:00
citus--7.0-1--7.0-2.sql Change implementation of shard_name UDF to get schema-qualified shard name 2017-07-04 10:49:40 +03:00
citus--7.0-2--7.0-3.sql Add a test for upgrading shard placements 2017-07-12 14:18:27 +02:00
citus--7.0-3--7.0-4.sql Add nodeRole column 2017-07-24 11:57:46 +03:00
citus--7.0-4--7.0-5.sql node_metadata takes out more sane locks 2017-07-24 11:57:46 +03:00
citus--7.0-5--7.0-6.sql Add function for dumping global wait edges 2017-07-25 16:52:32 +02:00
citus--7.0-6--7.0-7.sql Give isolation tester ability to see locks on workers 2017-07-26 18:43:04 +03:00
citus--7.0-7--7.0-8.sql master_activate_node UDF also returns noderole 2017-07-28 16:02:43 +03:00
citus--7.0-8--7.0-9.sql Disallow adding primary nodes to non-default clusters 2017-08-08 11:18:31 +03:00
citus--7.0-9--7.0-10.sql Add master_add_secondary_node() UDF 2017-08-09 17:10:48 +03:00
citus--7.0-10--7.0-11.sql Define Some Utility Functions 2017-08-10 12:42:46 +03:00
citus--7.0-11--7.0-12.sql Add citus_create_restore_point for distributed snapshots 2017-08-11 07:36:20 +02:00
citus--7.0-12--7.0-13.sql Add infrastructure for distributed deadlock detection 2017-08-12 13:28:37 +03:00
citus--7.0-13--7.0-14.sql Add infrastructure for distributed deadlock detection 2017-08-12 13:28:37 +03:00
citus.control Add infrastructure for distributed deadlock detection 2017-08-12 13:28:37 +03:00
citus.sql Remove unused master_get_round_robin_candidate_nodes 2017-03-07 11:51:24 +03:00
shared_library_init.c Create citus.use_secondary_nodes GUC 2017-08-10 17:37:17 +03:00