Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit beb012b

Browse files
committed
Disable parallel query in psql error-with-FETCH_COUNT test.
The buildfarm members using debug_parallel_query = regress are mostly unhappy with this test. I guess what is happening is that rows generated by a parallel worker are buffered, and might or might not get to the leader before the expected error occurs. We did not see any variability in the old version of this test because each FETCH would succeed or fail atomically, leading to a predictable number of rows emitted before failure. I don't find this to be a bug, just unspecified behavior, so let's disable parallel query for this one test case to make the results stable.
1 parent 90f5178 commit beb012b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/test/regress/expected/psql.out

+3
Original file line numberDiff line numberDiff line change
@@ -4788,6 +4788,8 @@ error code: 00000
47884788
\echo 'number of rows:' :ROW_COUNT
47894789
number of rows: 19
47904790
-- chunked results with an error after the first chunk
4791+
-- (we must disable parallel query here, else the behavior is timing-dependent)
4792+
set debug_parallel_query = off;
47914793
select 1/(15-unique2) from tenk1 order by unique2 limit 19;
47924794
?column?
47934795
----------
@@ -4812,6 +4814,7 @@ number of rows: 0
48124814
last error message: division by zero
48134815
\echo 'last error code:' :LAST_ERROR_SQLSTATE
48144816
last error code: 22012
4817+
reset debug_parallel_query;
48154818
\unset FETCH_COUNT
48164819
create schema testpart;
48174820
create role regress_partitioning_role;

src/test/regress/sql/psql.sql

+3
Original file line numberDiff line numberDiff line change
@@ -1169,12 +1169,15 @@ select unique2 from tenk1 order by unique2 limit 19;
11691169
\echo 'number of rows:' :ROW_COUNT
11701170

11711171
-- chunked results with an error after the first chunk
1172+
-- (we must disable parallel query here, else the behavior is timing-dependent)
1173+
set debug_parallel_query = off;
11721174
select 1/(15-unique2) from tenk1 order by unique2 limit 19;
11731175
\echo 'error:' :ERROR
11741176
\echo 'error code:' :SQLSTATE
11751177
\echo 'number of rows:' :ROW_COUNT
11761178
\echo 'last error message:' :LAST_ERROR_MESSAGE
11771179
\echo 'last error code:' :LAST_ERROR_SQLSTATE
1180+
reset debug_parallel_query;
11781181

11791182
\unset FETCH_COUNT
11801183

0 commit comments

Comments
 (0)