Re: parallel.c is not marked as test covered

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Clément Prévost <prevostclement(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: parallel.c is not marked as test covered
Date: 2016-06-15 07:00:44
Message-ID: CAA4eK1Lk4F09XpVD0JES4p268V42g-rFALGQroUUWMaaE4vSEw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 15, 2016 at 12:07 PM, Noah Misch <noah(at)leadboat(dot)com> wrote:
>
> On Wed, Jun 15, 2016 at 11:50:33AM +0530, Amit Kapila wrote:
> > 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.
>

Do you mean to say nonzero test coverage of force_parallel_mode=on for
error paths? I see that for force_parallel_mode=on, we have another test
in select_parallel.sql

set force_parallel_mode=1;

explain (costs off)

select stringu1::int2 from tenk1 where unique1 = 1;

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2016-06-15 07:25:08 Partition-wise join for join between (declaratively) partitioned tables
Previous Message Noah Misch 2016-06-15 06:54:33 Re: Should phraseto_tsquery('simple', 'blue blue') @@ to_tsvector('simple', 'blue') be true ?