pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.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: Wed, 15 Jun 2016 02:37:36 -0400
Message-ID: <20160615063736.GA1030423@tornado.leadboat.com> (raw)
In-Reply-To: <CAA4eK1Jv-e3reqkZSpE3fBSJfQEFnYLNpC8HwDB_uESEXHboVA@mail.gmail.com>
References: <CABaKae-eCW4d7SmgxoA8oBan5hhRnb0_qmHtQ580ANfPPNo8tw@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>
	<19903.1465923085@sss.pgh.pa.us>
	<CA+Tgmob2T5XNvaX4gZhe2UyETCih=-1-Nj891kPjN=DUPYzcOA@mail.gmail.com>
	<20764.1465924461@sss.pgh.pa.us>
	<CA+TgmobQSpF68eYELRg5WkH6Zz6=ajJU85C1JCCw83YZ01RyWQ@mail.gmail.com>
	<CAA4eK1Jv-e3reqkZSpE3fBSJfQEFnYLNpC8HwDB_uESEXHboVA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On Wed, Jun 15, 2016 at 11:50:33AM +0530, Amit Kapila wrote:
> In short, this test doesn't serve it's purpose which is to generate an
> error from worker.

That's bad.  Thanks for figuring out the problem.

> do $$begin
>   Perform stringu1::int2 from tenk1 where unique1 = 1;
> end$$;
> 
> ERROR:  invalid input syntax for integer: "BAAAAA"
> CONTEXT:  parallel worker, PID 4460
> SQL statement "SELECT stringu1::int2 from tenk1 where unique1 = 1"
> PL/pgSQL function inline_code_block line 2 at PERFORM
> 
> Considering above analysis is correct, we have below options:
> a. Modify the test such that it actually generates an error and to hide the
> context, we can exception block and raise some generic error.
> b. Modify the test such that it actually generates an error and to hide the
> context, we can use force_parallel_mode = regress;

Either of those sounds okay.  No need to raise a generic error; one can raise
SQLERRM to keep the main message and not the context.  I lean toward (a) so we
have nonzero test coverage of force_parallel_mode=on.


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



view thread (71+ messages)  latest in thread

Message-ID: <20160615063736.GA1030423@tornado.leadboat.com>
Permalink:  ../20160615063736.GA1030423@tornado.leadboat.com/
Also on:    postgresql.org/message-id/20160615063736.GA1030423@tornado.leadboat.com

 · 

reply

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: noah@leadboat.com, amit.kapila16@gmail.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com, prevostclement@gmail.com
  Subject: Re: parallel.c is not marked as test covered
  In-Reply-To: <20160615063736.GA1030423@tornado.leadboat.com>
  References: <CABaKae-eCW4d7SmgxoA8oBan5hhRnb0_qmHtQ580ANfPPNo8tw@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> <19903.1465923085@sss.pgh.pa.us> <CA+Tgmob2T5XNvaX4gZhe2UyETCih=-1-Nj891kPjN=DUPYzcOA@mail.gmail.com> <20764.1465924461@sss.pgh.pa.us> <CA+TgmobQSpF68eYELRg5WkH6Zz6=ajJU85C1JCCw83YZ01RyWQ@mail.gmail.com> <CAA4eK1Jv-e3reqkZSpE3fBSJfQEFnYLNpC8HwDB_uESEXHboVA@mail.gmail.com> <20160615063736.GA1030423@tornado.leadboat.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