mirror of https://github.com/citusdata/citus.git
Normalize partitioned table aliases in explain output (#4295)
Aliases that postgres choose for partitioned tables in explain output might change in different pg versions, so normalize them and remove the alternative test outputpull/4292/head
parent
d912d4bc38
commit
0556952607
|
@ -161,6 +161,21 @@ s/Citus.*currently supports/Citus currently supports/g
|
|||
s/prepared transaction with identifier .* does not exist/prepared transaction with identifier "citus_x_yyyyyy_zzz_w" does not exist/g
|
||||
s/failed to roll back prepared transaction '.*'/failed to roll back prepared transaction 'citus_x_yyyyyy_zzz_w'/g
|
||||
|
||||
# Table aliases for partitioned tables in explain outputs might change
|
||||
# regardless of postgres appended an _int suffix to alias, we always append _xxx suffix
|
||||
# Can be removed when we remove support for pg11 and pg12.
|
||||
# "-> <scanMethod> Scan on <tableName>_<partitionId>_<shardId> <tableName>_<aliasId>" and
|
||||
# "-> <scanMethod> Scan on <tableName>_<partitionId>_<shardId> <tableName>" becomes
|
||||
# "-> <scanMethod> Scan on <tableName>_<partitionId>_<shardId> <tableName>_xxx"
|
||||
s/(->.*Scan on\ +)(.*)(_[0-9]+)(_[0-9]+) \2(_[0-9]+|_xxx)?/\1\2\3\4 \2_xxx/g
|
||||
|
||||
# Table aliases for partitioned tables in "Hash Cond:" lines of explain outputs might change
|
||||
# This is only for multi_partitioning.sql test file
|
||||
# regardless of postgres appended an _int suffix to alias, we always append _xxx suffix
|
||||
# Can be removed when we remove support for pg11 and pg12.
|
||||
s/(partitioning_hash_join_test)(_[0-9]|_xxx)?(\.[a-zA-Z]+)/\1_xxx\3/g
|
||||
s/(partitioning_hash_test)(_[0-9]|_xxx)?(\.[a-zA-Z]+)/\1_xxx\3/g
|
||||
|
||||
# Errors with binary decoding where OIDs should be normalized
|
||||
s/wrong data type: [0-9]+, expected [0-9]+/wrong data type: XXXX, expected XXXX/g
|
||||
|
||||
|
|
|
@ -2900,7 +2900,7 @@ Custom Scan (Citus Adaptive)
|
|||
-> Insert on users_table_2_570028 citus_table_alias
|
||||
Conflict Resolution: UPDATE
|
||||
Conflict Arbiter Indexes: users_table_2_pkey_570028
|
||||
-> Seq Scan on users_table_2_570028 users_table_2
|
||||
-> Seq Scan on users_table_2_570028 users_table_xxx
|
||||
EXPLAIN :default_analyze_flags execute p4(20,20);
|
||||
Custom Scan (Citus Adaptive) (actual rows=0 loops=1)
|
||||
Task Count: 1
|
||||
|
@ -2912,7 +2912,7 @@ Custom Scan (Citus Adaptive) (actual rows=0 loops=1)
|
|||
Conflict Arbiter Indexes: users_table_2_pkey_570028
|
||||
Tuples Inserted: 0
|
||||
Conflicting Tuples: 0
|
||||
-> Seq Scan on users_table_2_570028 users_table_2 (actual rows=0 loops=1)
|
||||
-> Seq Scan on users_table_2_570028 users_table_xxx (actual rows=0 loops=1)
|
||||
-- simple test to confirm we can fetch long (>4KB) plans
|
||||
EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF, SUMMARY OFF) SELECT * FROM users_table_2 WHERE value_1::text = '00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000X';
|
||||
Custom Scan (Citus Adaptive) (actual rows=0 loops=1)
|
||||
|
@ -2922,7 +2922,7 @@ Custom Scan (Citus Adaptive) (actual rows=0 loops=1)
|
|||
-> Task
|
||||
Tuple data received from node: 0 bytes
|
||||
Node: host=localhost port=xxxxx dbname=regression
|
||||
-> Seq Scan on users_table_2_570028 users_table_2 (actual rows=0 loops=1)
|
||||
-> Seq Scan on users_table_2_570028 users_table_xxx (actual rows=0 loops=1)
|
||||
Filter: ((value_1)::text = '00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000X'::text)
|
||||
-- sorted explain analyze output
|
||||
CREATE TABLE explain_analyze_execution_time (a int);
|
||||
|
|
|
@ -1611,16 +1611,16 @@ SELECT * FROM partitioning_hash_test JOIN partitioning_hash_join_test USING (id,
|
|||
-> Task
|
||||
Node: host=localhost port=xxxxx dbname=regression
|
||||
-> Hash Join
|
||||
Hash Cond: ((partitioning_hash_join_test.id = partitioning_hash_test.id) AND (partitioning_hash_join_test.subid = partitioning_hash_test.subid))
|
||||
Hash Cond: ((partitioning_hash_join_test_xxx.id = partitioning_hash_test_xxx.id) AND (partitioning_hash_join_test_xxx.subid = partitioning_hash_test_xxx.subid))
|
||||
-> Append
|
||||
-> Seq Scan on partitioning_hash_join_test_0_1660133 partitioning_hash_join_test_1
|
||||
-> Seq Scan on partitioning_hash_join_test_1_1660137 partitioning_hash_join_test_2
|
||||
-> Seq Scan on partitioning_hash_join_test_2_1660141 partitioning_hash_join_test_3
|
||||
-> Seq Scan on partitioning_hash_join_test_0_1660133 partitioning_hash_join_test_xxx
|
||||
-> Seq Scan on partitioning_hash_join_test_1_1660137 partitioning_hash_join_test_xxx
|
||||
-> Seq Scan on partitioning_hash_join_test_2_1660141 partitioning_hash_join_test_xxx
|
||||
-> Hash
|
||||
-> Append
|
||||
-> Seq Scan on partitioning_hash_test_0_1660016 partitioning_hash_test_1
|
||||
-> Seq Scan on partitioning_hash_test_1_1660020 partitioning_hash_test_2
|
||||
-> Seq Scan on partitioning_hash_test_2_1660032 partitioning_hash_test_3
|
||||
-> Seq Scan on partitioning_hash_test_0_1660016 partitioning_hash_test_xxx
|
||||
-> Seq Scan on partitioning_hash_test_1_1660020 partitioning_hash_test_xxx
|
||||
-> Seq Scan on partitioning_hash_test_2_1660032 partitioning_hash_test_xxx
|
||||
(16 rows)
|
||||
|
||||
-- set partition-wise join on and parallel to off
|
||||
|
@ -1651,20 +1651,20 @@ SELECT * FROM partitioning_hash_test JOIN partitioning_hash_join_test USING (id,
|
|||
Node: host=localhost port=xxxxx dbname=regression
|
||||
-> Append
|
||||
-> Hash Join
|
||||
Hash Cond: ((partitioning_hash_join_test_1.id = partitioning_hash_test_1.id) AND (partitioning_hash_join_test_1.subid = partitioning_hash_test_1.subid))
|
||||
-> Seq Scan on partitioning_hash_join_test_0_1660133 partitioning_hash_join_test_1
|
||||
Hash Cond: ((partitioning_hash_join_test_xxx.id = partitioning_hash_test_xxx.id) AND (partitioning_hash_join_test_xxx.subid = partitioning_hash_test_xxx.subid))
|
||||
-> Seq Scan on partitioning_hash_join_test_0_1660133 partitioning_hash_join_test_xxx
|
||||
-> Hash
|
||||
-> Seq Scan on partitioning_hash_test_0_1660016 partitioning_hash_test_1
|
||||
-> Seq Scan on partitioning_hash_test_0_1660016 partitioning_hash_test_xxx
|
||||
-> Hash Join
|
||||
Hash Cond: ((partitioning_hash_test_2.id = partitioning_hash_join_test_2.id) AND (partitioning_hash_test_2.subid = partitioning_hash_join_test_2.subid))
|
||||
-> Seq Scan on partitioning_hash_test_1_1660020 partitioning_hash_test_2
|
||||
Hash Cond: ((partitioning_hash_test_xxx.id = partitioning_hash_join_test_xxx.id) AND (partitioning_hash_test_xxx.subid = partitioning_hash_join_test_xxx.subid))
|
||||
-> Seq Scan on partitioning_hash_test_1_1660020 partitioning_hash_test_xxx
|
||||
-> Hash
|
||||
-> Seq Scan on partitioning_hash_join_test_1_1660137 partitioning_hash_join_test_2
|
||||
-> Seq Scan on partitioning_hash_join_test_1_1660137 partitioning_hash_join_test_xxx
|
||||
-> Hash Join
|
||||
Hash Cond: ((partitioning_hash_join_test_3.id = partitioning_hash_test_3.id) AND (partitioning_hash_join_test_3.subid = partitioning_hash_test_3.subid))
|
||||
-> Seq Scan on partitioning_hash_join_test_2_1660141 partitioning_hash_join_test_3
|
||||
Hash Cond: ((partitioning_hash_join_test_xxx.id = partitioning_hash_test_xxx.id) AND (partitioning_hash_join_test_xxx.subid = partitioning_hash_test_xxx.subid))
|
||||
-> Seq Scan on partitioning_hash_join_test_2_1660141 partitioning_hash_join_test_xxx
|
||||
-> Hash
|
||||
-> Seq Scan on partitioning_hash_test_2_1660032 partitioning_hash_test_3
|
||||
-> Seq Scan on partitioning_hash_test_2_1660032 partitioning_hash_test_xxx
|
||||
(21 rows)
|
||||
|
||||
-- note that partition-wise joins only work when partition key is in the join
|
||||
|
@ -1680,16 +1680,16 @@ SELECT * FROM partitioning_hash_test JOIN partitioning_hash_join_test USING (id)
|
|||
-> Task
|
||||
Node: host=localhost port=xxxxx dbname=regression
|
||||
-> Hash Join
|
||||
Hash Cond: (partitioning_hash_join_test.id = partitioning_hash_test.id)
|
||||
Hash Cond: (partitioning_hash_join_test_xxx.id = partitioning_hash_test_xxx.id)
|
||||
-> Append
|
||||
-> Seq Scan on partitioning_hash_join_test_0_1660133 partitioning_hash_join_test_1
|
||||
-> Seq Scan on partitioning_hash_join_test_1_1660137 partitioning_hash_join_test_2
|
||||
-> Seq Scan on partitioning_hash_join_test_2_1660141 partitioning_hash_join_test_3
|
||||
-> Seq Scan on partitioning_hash_join_test_0_1660133 partitioning_hash_join_test_xxx
|
||||
-> Seq Scan on partitioning_hash_join_test_1_1660137 partitioning_hash_join_test_xxx
|
||||
-> Seq Scan on partitioning_hash_join_test_2_1660141 partitioning_hash_join_test_xxx
|
||||
-> Hash
|
||||
-> Append
|
||||
-> Seq Scan on partitioning_hash_test_0_1660016 partitioning_hash_test_1
|
||||
-> Seq Scan on partitioning_hash_test_1_1660020 partitioning_hash_test_2
|
||||
-> Seq Scan on partitioning_hash_test_2_1660032 partitioning_hash_test_3
|
||||
-> Seq Scan on partitioning_hash_test_0_1660016 partitioning_hash_test_xxx
|
||||
-> Seq Scan on partitioning_hash_test_1_1660020 partitioning_hash_test_xxx
|
||||
-> Seq Scan on partitioning_hash_test_2_1660032 partitioning_hash_test_xxx
|
||||
(16 rows)
|
||||
|
||||
-- reset partition-wise join
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue