diff --git a/src/test/regress/expected/drop_partitioned_table.out b/src/test/regress/expected/drop_partitioned_table.out index 9b4a94e89..0f5c8be14 100644 --- a/src/test/regress/expected/drop_partitioned_table.out +++ b/src/test/regress/expected/drop_partitioned_table.out @@ -359,18 +359,32 @@ BEGIN; SET citus.log_remote_commands TO on; DROP TABLE parent; NOTICE: issuing BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;SELECT assign_distributed_transaction_id(xx, xx, 'xxxxxxx'); +NOTICE: issuing SET citus.enable_ddl_propagation TO 'off' +NOTICE: issuing ALTER TABLE IF EXISTS drop_partitioned_table.parent DETACH PARTITION drop_partitioned_table.child1; +NOTICE: issuing SET citus.enable_ddl_propagation TO 'on' +NOTICE: issuing SELECT worker_drop_distributed_table('drop_partitioned_table.parent') +NOTICE: issuing BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;SELECT assign_distributed_transaction_id(xx, xx, 'xxxxxxx'); NOTICE: issuing DROP TABLE IF EXISTS drop_partitioned_table.parent_xxxxx CASCADE +NOTICE: issuing SELECT worker_drop_distributed_table('drop_partitioned_table.child1') ROLLBACK; NOTICE: issuing ROLLBACK +NOTICE: issuing ROLLBACK -- Case 2 - we shouldn't skip BEGIN; SET citus.log_remote_commands TO on; DROP TABLE parent, child1; NOTICE: issuing BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;SELECT assign_distributed_transaction_id(xx, xx, 'xxxxxxx'); +NOTICE: issuing SET citus.enable_ddl_propagation TO 'off' +NOTICE: issuing ALTER TABLE IF EXISTS drop_partitioned_table.parent DETACH PARTITION drop_partitioned_table.child1; +NOTICE: issuing SET citus.enable_ddl_propagation TO 'on' +NOTICE: issuing SELECT worker_drop_distributed_table('drop_partitioned_table.parent') +NOTICE: issuing BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;SELECT assign_distributed_transaction_id(xx, xx, 'xxxxxxx'); NOTICE: issuing DROP TABLE IF EXISTS drop_partitioned_table.parent_xxxxx CASCADE +NOTICE: issuing SELECT worker_drop_distributed_table('drop_partitioned_table.child1') NOTICE: issuing DROP TABLE IF EXISTS drop_partitioned_table.child1_xxxxx CASCADE ROLLBACK; NOTICE: issuing ROLLBACK +NOTICE: issuing ROLLBACK DROP SCHEMA drop_partitioned_table CASCADE; NOTICE: drop cascades to 3 other objects SELECT run_command_on_workers('DROP SCHEMA IF EXISTS drop_partitioned_table CASCADE'); diff --git a/src/test/regress/expected/multi_partitioning.out b/src/test/regress/expected/multi_partitioning.out index 266154426..3cf7afa0b 100644 --- a/src/test/regress/expected/multi_partitioning.out +++ b/src/test/regress/expected/multi_partitioning.out @@ -1940,19 +1940,27 @@ DROP TABLE partitioning_test_2008, partitioning_test_2009, partitioning_test_201 -- verify this doesn't crash and gives a debug message for dropped table SET client_min_messages TO DEBUG1; DROP TABLE partitioning_test, reference_table; +DEBUG: drop cascades to constraint partitioning_reference_fkey on table partitioning_test +DETAIL: from localhost:xxxxx +CONTEXT: SQL statement "SELECT master_remove_distributed_table_metadata_from_workers(v_obj.objid, v_obj.schema_name, v_obj.object_name)" +PL/pgSQL function citus_drop_trigger() line XX at PERFORM +DEBUG: drop cascades to constraint partitioning_reference_fkey on table partitioning_test +DETAIL: from localhost:xxxxx +CONTEXT: SQL statement "SELECT master_remove_distributed_table_metadata_from_workers(v_obj.objid, v_obj.schema_name, v_obj.object_name)" +PL/pgSQL function citus_drop_trigger() line XX at PERFORM DEBUG: switching to sequential query execution mode DETAIL: Table "" is modified, which might lead to data inconsistencies or distributed deadlocks via parallel accesses to hash distributed tables due to foreign keys. Any parallel modification to those hash distributed tables in the same transaction can only be executed in sequential query execution mode CONTEXT: SQL statement "SELECT citus_drop_all_shards(v_obj.objid, v_obj.schema_name, v_obj.object_name, drop_shards_metadata_only := false)" PL/pgSQL function citus_drop_trigger() line XX at PERFORM DEBUG: drop cascades to 2 other objects -DETAIL: drop cascades to constraint partitioning_reference_fkey_1660302 on table partitioning_schema.partitioning_test_1660302 -drop cascades to constraint partitioning_reference_fkey_1660304 on table partitioning_schema.partitioning_test_1660304 +DETAIL: drop cascades to constraint partitioning_reference_fkey_1660302 on table partitioning_test_1660302 +drop cascades to constraint partitioning_reference_fkey_1660304 on table partitioning_test_1660304 DETAIL: from localhost:xxxxx CONTEXT: SQL statement "SELECT citus_drop_all_shards(v_obj.objid, v_obj.schema_name, v_obj.object_name, drop_shards_metadata_only := false)" PL/pgSQL function citus_drop_trigger() line XX at PERFORM DEBUG: drop cascades to 2 other objects -DETAIL: drop cascades to constraint partitioning_reference_fkey_1660303 on table partitioning_schema.partitioning_test_1660303 -drop cascades to constraint partitioning_reference_fkey_1660305 on table partitioning_schema.partitioning_test_1660305 +DETAIL: drop cascades to constraint partitioning_reference_fkey_1660303 on table partitioning_test_1660303 +drop cascades to constraint partitioning_reference_fkey_1660305 on table partitioning_test_1660305 DETAIL: from localhost:xxxxx CONTEXT: SQL statement "SELECT citus_drop_all_shards(v_obj.objid, v_obj.schema_name, v_obj.object_name, drop_shards_metadata_only := false)" PL/pgSQL function citus_drop_trigger() line XX at PERFORM @@ -3773,6 +3781,7 @@ NOTICE: Replicating reference table "supplier" to the node localhost:xxxxx NOTICE: Replicating reference table "users_ref_test_table" to the node localhost:xxxxx NOTICE: Replicating reference table "events_reference_table" to the node localhost:xxxxx NOTICE: Replicating reference table "users_reference_table" to the node localhost:xxxxx +NOTICE: localhost:xxxxx is the coordinator and already contains metadata, skipping syncing the metadata ?column? --------------------------------------------------------------------- 1 diff --git a/src/test/regress/expected/partitioning_issue_3970.out b/src/test/regress/expected/partitioning_issue_3970.out index 8d343c726..315d942bd 100644 --- a/src/test/regress/expected/partitioning_issue_3970.out +++ b/src/test/regress/expected/partitioning_issue_3970.out @@ -69,7 +69,7 @@ ORDER BY 1,2,3; \c - - - :worker_1_port SELECT relname, conname, pg_catalog.pg_get_constraintdef(con.oid, true) FROM pg_constraint con JOIN pg_class rel ON (rel.oid=con.conrelid) -WHERE relname LIKE 'part_table%' +WHERE relname SIMILAR TO 'part_table%\_\d%' ORDER BY 1,2,3; relname | conname | pg_get_constraintdef --------------------------------------------------------------------- diff --git a/src/test/regress/multi_1_schedule b/src/test/regress/multi_1_schedule index 77ecc86e8..70a255ba3 100644 --- a/src/test/regress/multi_1_schedule +++ b/src/test/regress/multi_1_schedule @@ -92,12 +92,9 @@ test: ensure_no_intermediate_data_leak # Tests for partitioning support # ---------- test: multi_partitioning_utils replicated_partitioned_table -test: check_mx -test: turn_mx_off test: multi_partitioning partitioning_issue_3970 test: drop_partitioned_table test: multi_fix_partition_shard_index_names -test: turn_mx_on test: partition_wise_join # ---------- diff --git a/src/test/regress/sql/partitioning_issue_3970.sql b/src/test/regress/sql/partitioning_issue_3970.sql index 13190820c..b95f2a2ad 100644 --- a/src/test/regress/sql/partitioning_issue_3970.sql +++ b/src/test/regress/sql/partitioning_issue_3970.sql @@ -46,7 +46,7 @@ ORDER BY 1,2,3; \c - - - :worker_1_port SELECT relname, conname, pg_catalog.pg_get_constraintdef(con.oid, true) FROM pg_constraint con JOIN pg_class rel ON (rel.oid=con.conrelid) -WHERE relname LIKE 'part_table%' +WHERE relname SIMILAR TO 'part_table%\_\d%' ORDER BY 1,2,3; \c - - - :master_port