CREATE ROLE distributed_source_role1; create ROLE "distributed_source_role-\!"; CREATE ROLE distributed_target_role1; set citus.enable_create_role_propagation to off; create ROLE local_target_role1; NOTICE: not propagating CREATE ROLE/USER commands to other nodes HINT: Connect to other nodes directly to manually create all necessary users and roles. create role local_source_role1; NOTICE: not propagating CREATE ROLE/USER commands to other nodes HINT: Connect to other nodes directly to manually create all necessary users and roles. reset citus.enable_create_role_propagation; GRANT CREATE ON SCHEMA public TO distributed_source_role1,"distributed_source_role-\!"; SET ROLE distributed_source_role1; CREATE TABLE public.test_table (col1 int); set role "distributed_source_role-\!"; CREATE TABLE public.test_table2 (col2 int); RESET ROLE; select create_distributed_table('test_table', 'col1'); create_distributed_table --------------------------------------------------------------------- (1 row) select create_distributed_table('test_table2', 'col2'); create_distributed_table --------------------------------------------------------------------- (1 row) SELECT result from run_command_on_all_nodes( $$ SELECT jsonb_agg(to_jsonb(q2.*)) FROM ( SELECT schemaname, tablename, tableowner FROM pg_tables WHERE tablename in ('test_table', 'test_table2') ) q2 $$ ) ORDER BY result; result --------------------------------------------------------------------- [{"tablename": "test_table", "schemaname": "public", "tableowner": "distributed_source_role1"}, {"tablename": "test_table2", "schemaname": "public", "tableowner": "distributed_source_role-\\!"}] [{"tablename": "test_table", "schemaname": "public", "tableowner": "distributed_source_role1"}, {"tablename": "test_table2", "schemaname": "public", "tableowner": "distributed_source_role-\\!"}] [{"tablename": "test_table", "schemaname": "public", "tableowner": "distributed_source_role1"}, {"tablename": "test_table2", "schemaname": "public", "tableowner": "distributed_source_role-\\!"}] (3 rows) --tests for reassing owned by with multiple distributed roles and a local role to a distributed role --local role should be ignored set citus.log_remote_commands to on; set citus.grep_remote_commands = '%REASSIGN OWNED BY%'; REASSIGN OWNED BY distributed_source_role1,"distributed_source_role-\!",local_source_role1 TO distributed_target_role1; NOTICE: issuing REASSIGN OWNED BY distributed_source_role1, "distributed_source_role-\!" TO distributed_target_role1 DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx NOTICE: issuing REASSIGN OWNED BY distributed_source_role1, "distributed_source_role-\!" TO distributed_target_role1 DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx reset citus.grep_remote_commands; reset citus.log_remote_commands; --check if the owner changed to distributed_target_role1 RESET citus.log_remote_commands; SELECT result from run_command_on_all_nodes( $$ SELECT jsonb_agg(to_jsonb(q2.*)) FROM ( SELECT schemaname, tablename, tableowner FROM pg_tables WHERE tablename in ('test_table', 'test_table2') ) q2 $$ ) ORDER BY result; result --------------------------------------------------------------------- [{"tablename": "test_table", "schemaname": "public", "tableowner": "distributed_target_role1"}, {"tablename": "test_table2", "schemaname": "public", "tableowner": "distributed_target_role1"}] [{"tablename": "test_table", "schemaname": "public", "tableowner": "distributed_target_role1"}, {"tablename": "test_table2", "schemaname": "public", "tableowner": "distributed_target_role1"}] [{"tablename": "test_table", "schemaname": "public", "tableowner": "distributed_target_role1"}, {"tablename": "test_table2", "schemaname": "public", "tableowner": "distributed_target_role1"}] (3 rows) --tests for reassing owned by with multiple distributed roles and a local role to a local role --local role should be ignored SET ROLE distributed_source_role1; CREATE TABLE public.test_table3 (col1 int); set role "distributed_source_role-\!"; CREATE TABLE public.test_table4 (col2 int); RESET ROLE; select create_distributed_table('test_table3', 'col1'); create_distributed_table --------------------------------------------------------------------- (1 row) select create_distributed_table('test_table4', 'col2'); create_distributed_table --------------------------------------------------------------------- (1 row) set citus.log_remote_commands to on; set citus.grep_remote_commands = '%REASSIGN OWNED BY%'; set citus.enable_create_role_propagation to off; REASSIGN OWNED BY distributed_source_role1,"distributed_source_role-\!",local_source_role1 TO local_target_role1; NOTICE: issuing REASSIGN OWNED BY distributed_source_role1, "distributed_source_role-\!" TO local_target_role1 DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx NOTICE: issuing REASSIGN OWNED BY distributed_source_role1, "distributed_source_role-\!" TO local_target_role1 DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx reset citus.grep_remote_commands; reset citus.log_remote_commands; --check if the owner changed to local_target_role1 SET citus.log_remote_commands = false; SELECT result from run_command_on_all_nodes( $$ SELECT jsonb_agg(to_jsonb(q2.*)) FROM ( SELECT schemaname, tablename, tableowner FROM pg_tables WHERE tablename in ('test_table3', 'test_table4') ) q2 $$ ) ORDER BY result; result --------------------------------------------------------------------- [{"tablename": "test_table3", "schemaname": "public", "tableowner": "local_target_role1"}, {"tablename": "test_table4", "schemaname": "public", "tableowner": "local_target_role1"}] [{"tablename": "test_table4", "schemaname": "public", "tableowner": "local_target_role1"}, {"tablename": "test_table3", "schemaname": "public", "tableowner": "local_target_role1"}] [{"tablename": "test_table4", "schemaname": "public", "tableowner": "local_target_role1"}, {"tablename": "test_table3", "schemaname": "public", "tableowner": "local_target_role1"}] (3 rows) --clear resources SET citus.log_remote_commands = true; DROP OWNED BY distributed_source_role1, "distributed_source_role-\!",distributed_target_role1,local_target_role1; NOTICE: issuing BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;SELECT assign_distributed_transaction_id(xx, xx, 'xxxxxxx'); DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;SELECT assign_distributed_transaction_id(xx, xx, 'xxxxxxx'); DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing SELECT worker_drop_distributed_table('public.test_table') DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing SELECT worker_drop_distributed_table('public.test_table') DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing SELECT worker_drop_distributed_table('public.test_table2') DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing SELECT worker_drop_distributed_table('public.test_table2') DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table2_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table2_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table2_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table2_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table2_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table2_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table2_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table2_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing SELECT worker_drop_distributed_table('public.test_table3') DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing SELECT worker_drop_distributed_table('public.test_table3') DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table3_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table3_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table3_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table3_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table3_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table3_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table3_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table3_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing SELECT worker_drop_distributed_table('public.test_table4') DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing SELECT worker_drop_distributed_table('public.test_table4') DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table4_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table4_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table4_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table4_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table4_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table4_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table4_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing DROP TABLE IF EXISTS public.test_table4_xxxxx CASCADE DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx 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 NOTICE: issuing SELECT pg_catalog.citus_internal_delete_colocation_metadata(1390004) DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx CONTEXT: SQL statement "SELECT master_remove_partition_metadata(v_obj.objid, v_obj.schema_name, v_obj.object_name)" PL/pgSQL function citus_drop_trigger() line XX at PERFORM NOTICE: issuing SELECT pg_catalog.citus_internal_delete_colocation_metadata(1390004) DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx CONTEXT: SQL statement "SELECT master_remove_partition_metadata(v_obj.objid, v_obj.schema_name, v_obj.object_name)" PL/pgSQL function citus_drop_trigger() line XX at PERFORM NOTICE: issuing SET citus.enable_ddl_propagation TO 'off' DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx NOTICE: issuing SET citus.enable_ddl_propagation TO 'off' DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx NOTICE: issuing DROP OWNED BY distributed_source_role1, "distributed_source_role-\!", distributed_target_role1, local_target_role1 RESTRICT DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx NOTICE: issuing DROP OWNED BY distributed_source_role1, "distributed_source_role-\!", distributed_target_role1, local_target_role1 RESTRICT DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx NOTICE: issuing SET citus.enable_ddl_propagation TO 'on' DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx NOTICE: issuing SET citus.enable_ddl_propagation TO 'on' DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx NOTICE: issuing PREPARE TRANSACTION 'citus_xx_xx_xx_xx' DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx NOTICE: issuing PREPARE TRANSACTION 'citus_xx_xx_xx_xx' DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx NOTICE: issuing COMMIT PREPARED 'citus_xx_xx_xx_xx' DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx NOTICE: issuing COMMIT PREPARED 'citus_xx_xx_xx_xx' DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx reset citus.log_remote_commands; SELECT result from run_command_on_all_nodes( $$ SELECT jsonb_agg(to_jsonb(q2.*)) FROM ( SELECT schemaname, tablename, tableowner FROM pg_tables WHERE tablename in ('test_table', 'test_table2', 'test_table3', 'test_table4') ) q2 $$ ) ORDER BY result; result --------------------------------------------------------------------- (3 rows) SET citus.log_remote_commands = true; set citus.grep_remote_commands = '%DROP ROLE%'; drop role distributed_source_role1, "distributed_source_role-\!",distributed_target_role1,local_target_role1,local_source_role1;