On 6/20/16 11:16 PM, Tom Lane wrote:
>> > I think this test would only fail if it runs out of workers, and that 
>> > would only happen in an installcheck run against a server configured in 
>> > a nonstandard way or that is doing something else -- which doesn't 
>> > happen on the buildfarm.
> Um, if you're speaking of select_parallel, that already runs in parallel
> with two other regression tests, and there is no annotation in the
> parallel_schedule file suggesting that adding more scripts to that group
> would be bad.  But yes, perhaps putting this test into its own standalone
> group would be enough of a fix.

Maybe now would be a good time to address this by applying the attached
patch to master and seeing what happens?

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>From 53bbb416a74d18b14a91619246a5043fe34d3d61 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pete...@gmx.net>
Date: Tue, 16 Aug 2016 12:00:00 -0400
Subject: [PATCH] Run select_parallel test by itself

Remove the plpgsql wrapping that hides the context.  So now the test
will fail if the work doesn't actually happen in a parallel worker.  Run
the test in its own test group to ensure it won't run out of resources
for that.
---
 src/test/regress/expected/select_parallel.out | 13 +++----------
 src/test/regress/parallel_schedule            |  5 ++++-
 src/test/regress/sql/select_parallel.sql      |  9 +--------
 3 files changed, 8 insertions(+), 19 deletions(-)

diff --git a/src/test/regress/expected/select_parallel.out b/src/test/regress/expected/select_parallel.out
index 2286faf..1efcfc2 100644
--- a/src/test/regress/expected/select_parallel.out
+++ b/src/test/regress/expected/select_parallel.out
@@ -111,14 +111,7 @@ explain (costs off)
          Index Cond: (unique1 = 1)
 (5 rows)
 
-do $$begin
-  -- Provoke error, possibly in worker.  If this error happens to occur in
-  -- the worker, there will be a CONTEXT line which must be hidden.
-  perform stringu1::int2 from tenk1 where unique1 = 1;
-  exception
-	when others then
-		raise 'SQLERRM: %', sqlerrm;
-end$$;
-ERROR:  SQLERRM: invalid input syntax for integer: "BAAAAA"
-CONTEXT:  PL/pgSQL function inline_code_block line 7 at RAISE
+select stringu1::int2 from tenk1 where unique1 = 1;
+ERROR:  invalid input syntax for integer: "BAAAAA"
+CONTEXT:  parallel worker
 rollback;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index 3815182..1cb5dfc 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -92,7 +92,10 @@ test: brin gin gist spgist privileges init_privs security_label collate matview
 test: alter_generic alter_operator misc psql async dbsize misc_functions
 
 # rules cannot run concurrently with any test that creates a view
-test: rules psql_crosstab select_parallel amutils
+test: rules psql_crosstab amutils
+
+# run by itself so it can run parallel workers
+test: select_parallel
 
 # ----------
 # Another group of parallel tests
diff --git a/src/test/regress/sql/select_parallel.sql b/src/test/regress/sql/select_parallel.sql
index 38d3166..3474947 100644
--- a/src/test/regress/sql/select_parallel.sql
+++ b/src/test/regress/sql/select_parallel.sql
@@ -44,13 +44,6 @@
 explain (costs off)
   select stringu1::int2 from tenk1 where unique1 = 1;
 
-do $$begin
-  -- Provoke error, possibly in worker.  If this error happens to occur in
-  -- the worker, there will be a CONTEXT line which must be hidden.
-  perform stringu1::int2 from tenk1 where unique1 = 1;
-  exception
-	when others then
-		raise 'SQLERRM: %', sqlerrm;
-end$$;
+select stringu1::int2 from tenk1 where unique1 = 1;
 
 rollback;
-- 
2.9.3

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to