From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Noah Misch <noah@leadboat.com>
Cc: Clément Prévost <prevostclement@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: parallel.c is not marked as test covered
Date: Tue, 16 Aug 2016 16:04:59 -0400
Message-ID: <48de8ea0-ae7c-d3e9-6c98-cb6b77d85708@2ndquadrant.com> (raw)
In-Reply-To: <14832.1466479013@sss.pgh.pa.us>
References: <CAKJS1f-3evRXNfTh7GLFGfCkXhxOs0G5PJ_JQ7EbJYnsgK61yw@mail.gmail.com>
<20160608034342.GA804701@tornado.leadboat.com>
<58cd047c-deba-0863-b279-56b931237176@2ndquadrant.com>
<CA+Tgmoac+sysZi0QKtexCKwQ99fjiwfrbQJ4aom-i1C0s6SeAg@mail.gmail.com>
<CA+Tgmob78-4NEYsqA7mapdqLgkAyVuOAKmtgQH9qiMhand-acg@mail.gmail.com>
<bfd204ab-ab1a-792a-b345-0274a09a4b5f@2ndquadrant.com>
<CA+TgmoYBiBJFcPUFS+R8XN7_DCf5jhQvyopsS6C1y-6EYjBiLw@mail.gmail.com>
<CA+TgmoaJGJ6DPjWPwwVzbNYW6Aj5f33gYuwU3eg13g=f5wqGXw@mail.gmail.com>
<b99734a7-4e40-af77-054a-b6c1409d9ef1@2ndquadrant.com>
<24863.1466311214@sss.pgh.pa.us>
<CAA4eK1LEe+jJUvQa3p3LEt5eckO4Fr=YyxynaUYm-eB35T0cxQ@mail.gmail.com>
<13382.1466350602@sss.pgh.pa.us>
<CA+TgmoaDFcbhNLvS+h+2=oEiAwza8AoKrtC76hn1DEk7Pz_BuQ@mail.gmail.com>
<c85fc422-6273-2e4f-5690-a588fe0fc6c6@2ndquad! rant.com>
<22043.1466373325@sss.pgh.pa.us>
<2! cf25a38-e2be-76a1-824e-6943ce345a44@2ndquadrant.com>
<14832.1466479013@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
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
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackersAttachments:0001-Run-select_parallel-test-by-itself.patch (text/x-patch, 2.8K) download
From 53bbb416a74d18b14a91619246a5043fe34d3d61 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter_e@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.outindex 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_scheduleindex 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.sqlindex 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: peter.eisentraut@2ndquadrant.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, amit.kapila16@gmail.com, noah@leadboat.com, prevostclement@gmail.com
Subject: Re: parallel.c is not marked as test covered
In-Reply-To: <48de8ea0-ae7c-d3e9-6c98-cb6b77d85708@2ndquadrant.com>
References: <CAKJS1f-3evRXNfTh7GLFGfCkXhxOs0G5PJ_JQ7EbJYnsgK61yw@mail.gmail.com> <20160608034342.GA804701@tornado.leadboat.com> <58cd047c-deba-0863-b279-56b931237176@2ndquadrant.com> <CA+Tgmoac+sysZi0QKtexCKwQ99fjiwfrbQJ4aom-i1C0s6SeAg@mail.gmail.com> <CA+Tgmob78-4NEYsqA7mapdqLgkAyVuOAKmtgQH9qiMhand-acg@mail.gmail.com> <bfd204ab-ab1a-792a-b345-0274a09a4b5f@2ndquadrant.com> <CA+TgmoYBiBJFcPUFS+R8XN7_DCf5jhQvyopsS6C1y-6EYjBiLw@mail.gmail.com> <CA+TgmoaJGJ6DPjWPwwVzbNYW6Aj5f33gYuwU3eg13g=f5wqGXw@mail.gmail.com> <b99734a7-4e40-af77-054a-b6c1409d9ef1@2ndquadrant.com> <24863.1466311214@sss.pgh.pa.us> <CAA4eK1LEe+jJUvQa3p3LEt5eckO4Fr=YyxynaUYm-eB35T0cxQ@mail.gmail.com> <13382.1466350602@sss.pgh.pa.us> <CA+TgmoaDFcbhNLvS+h+2=oEiAwza8AoKrtC76hn1DEk7Pz_BuQ@mail.gmail.com> <22043.1466373325@sss.pgh.pa.us> <14832.1466479013@sss.pgh.pa.us> <48de8ea0-ae7c-d3e9-6c98-cb6b77d85708@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox