Grep logs for deterministic global_cancel test results (#5948)

(cherry picked from commit 313104ab9b)
release-11.0-ozan
Hanefi Onaldi 2022-05-18 11:09:54 +03:00
parent c440cbb643
commit 530aafd8ee
No known key found for this signature in database
GPG Key ID: F18CDB10BA0DFDC7
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,7 @@
CREATE SCHEMA global_cancel; CREATE SCHEMA global_cancel;
SET search_path TO global_cancel; SET search_path TO global_cancel;
SET citus.next_shard_id TO 56789000; SET citus.next_shard_id TO 56789000;
SET citus.grep_remote_commands TO '%pg_cancel_backend%';
CREATE TABLE dist_table (a INT, b INT); CREATE TABLE dist_table (a INT, b INT);
SELECT create_distributed_table ('dist_table', 'a', shard_count:=4); SELECT create_distributed_table ('dist_table', 'a', shard_count:=4);
create_distributed_table create_distributed_table
@ -25,8 +26,6 @@ DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
ERROR: canceling statement due to user request ERROR: canceling statement due to user request
BEGIN; BEGIN;
SELECT pg_cancel_backend(:coordinator_gpid) FROM dist_table WHERE a = 1; SELECT pg_cancel_backend(:coordinator_gpid) FROM dist_table WHERE a = 1;
NOTICE: issuing BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;SELECT assign_distributed_transaction_id(xx, xx, 'xxxxxxx');
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
NOTICE: issuing SELECT pg_cancel_backend('xxxxx'::bigint) AS pg_cancel_backend FROM global_cancel.dist_table_56789000 dist_table WHERE (a OPERATOR(pg_catalog.=) 1) NOTICE: issuing SELECT pg_cancel_backend('xxxxx'::bigint) AS pg_cancel_backend FROM global_cancel.dist_table_56789000 dist_table WHERE (a OPERATOR(pg_catalog.=) 1)
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
ERROR: canceling statement due to user request ERROR: canceling statement due to user request
@ -100,13 +99,13 @@ WHERE isactive = true AND noderole = 'primary';
SELECT citus_nodeid_for_gpid(10000000000 * 2 + 3); SELECT citus_nodeid_for_gpid(10000000000 * 2 + 3);
citus_nodeid_for_gpid citus_nodeid_for_gpid
--------------------------------------------------------------------- ---------------------------------------------------------------------
2 2
(1 row) (1 row)
SELECT citus_pid_for_gpid(10000000000 * 2 + 3); SELECT citus_pid_for_gpid(10000000000 * 2 + 3);
citus_pid_for_gpid citus_pid_for_gpid
--------------------------------------------------------------------- ---------------------------------------------------------------------
3 3
(1 row) (1 row)
DROP SCHEMA global_cancel CASCADE; DROP SCHEMA global_cancel CASCADE;

View File

@ -1,6 +1,7 @@
CREATE SCHEMA global_cancel; CREATE SCHEMA global_cancel;
SET search_path TO global_cancel; SET search_path TO global_cancel;
SET citus.next_shard_id TO 56789000; SET citus.next_shard_id TO 56789000;
SET citus.grep_remote_commands TO '%pg_cancel_backend%';
CREATE TABLE dist_table (a INT, b INT); CREATE TABLE dist_table (a INT, b INT);
SELECT create_distributed_table ('dist_table', 'a', shard_count:=4); SELECT create_distributed_table ('dist_table', 'a', shard_count:=4);