Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZkd5-0007X4-WF for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Aug 2016 20:06:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bZkd5-0006wx-Dy for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Aug 2016 20:06:31 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bZkbg-000468-Rk for pgsql-hackers@postgresql.org; Tue, 16 Aug 2016 20:05:05 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bZkbd-0002o4-Cj for pgsql-hackers@postgresql.org; Tue, 16 Aug 2016 20:05:03 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 9CD14205E4; Tue, 16 Aug 2016 16:05:00 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Tue, 16 Aug 2016 16:05:00 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=sc2D7V/a50pP9HUAM/yDLMAFZdU=; b=MbuTA nbS9riJx22fg3/K9m7nt9J/DbbSVPMBfdwSc9Pk7r3TVN7mPsQNY9qV2wWQaohuM kmvWZDPbJjhw8XS8KBY1pw4u3JocQb3164Y8vM8sCmEG7PRhE3OJQKGWbRR746Ov T/cat2aigN38FL+j+l6m9IntlGXJAcMpSOgEY8= X-Sasl-enc: axDScO45Q6GX3bZvV3hrx+ccqWhqstXu+Rl+h7qd/EdQ 1471377900 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 0DF98F296F; Tue, 16 Aug 2016 16:05:00 -0400 (EDT) Subject: Re: parallel.c is not marked as test covered To: Tom Lane References: <20160608034342.GA804701@tornado.leadboat.com> <58cd047c-deba-0863-b279-56b931237176@2ndquadrant.com> <24863.1466311214@sss.pgh.pa.us> <13382.1466350602@sss.pgh.pa.us> <22043.1466373325@sss.pgh.pa.us> <2! cf25a38-e2be-76a1-824e-6943ce345a44@2ndquadrant.com> <14832.1466479013@sss.pgh.pa.us> Cc: Robert Haas , Amit Kapila , Noah Misch , =?UTF-8?B?Q2zDqW1lbnQgUHLDqXZvc3Q=?= , PostgreSQL-development From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <48de8ea0-ae7c-d3e9-6c98-cb6b77d85708@2ndquadrant.com> Date: Tue, 16 Aug 2016 16:04:59 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <14832.1466479013@sss.pgh.pa.us> Content-Type: multipart/mixed; boundary="------------119274595BB5B96F3D6C4941" X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org This is a multi-part message in MIME format. --------------119274595BB5B96F3D6C4941 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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 --------------119274595BB5B96F3D6C4941 Content-Type: text/x-patch; name="0001-Run-select_parallel-test-by-itself.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Run-select_parallel-test-by-itself.patch" From 53bbb416a74d18b14a91619246a5043fe34d3d61 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut 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 --------------119274595BB5B96F3D6C4941 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers --------------119274595BB5B96F3D6C4941--