Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bD4SU-0003ba-9A for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Jun 2016 06:37:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bD4ST-0001VM-Rm for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Jun 2016 06:37:49 +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 1bD4SS-0001VD-1Y for pgsql-hackers@postgresql.org; Wed, 15 Jun 2016 06:37:48 +0000 Received: from mail-pf0-x234.google.com ([2607:f8b0:400e:c00::234]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bD4SK-00044g-TL for pgsql-hackers@postgresql.org; Wed, 15 Jun 2016 06:37:46 +0000 Received: by mail-pf0-x234.google.com with SMTP id i123so1918935pfg.0 for ; Tue, 14 Jun 2016 23:37:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=UTy1Gt7L7D7n7URjYslWzfoDx2yu0dcejQr9ShM2jAw=; b=DOvP6b2KluvacYpUPUuNKaIwAyP4yPBtMqpRaQ8onH4iFxbLGjobVD34zRHrHlbppY eA84FCEG7uoqlgPc3WL+iL8Xb0OZDxNHWyvM3RfBrgEcCqSB1ONgB0lXFLnp0TNWeJhh 8lUhCMvVs++cAqUYvX/VFMdjK5ddj2suXZPbM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=UTy1Gt7L7D7n7URjYslWzfoDx2yu0dcejQr9ShM2jAw=; b=iTfexb77HhCX6ooDq6rd0PjoH5sKBRIOkdnKxjqmfOCP7OrUdWOOZu0g5T0mtRPDUY vF6jd6qV0QXt8YYUcO6KfjGojY1ECzTCPoRaJkUGV+pJDZ+SlfRbnOVqoz66oN/1Vjpz kqXLOAavL+bYPfgg1TjcR3FtjUUaygiJYjEM90L5mR9jHHsLLor3ezBK0yQldlrSuGas 3TXHUvgdLHDPIXFByKc42uTLRQqRn5dyWG1ia4kTtSkRuZZq1oh91NWVYrOAJirwg5gn fMxsXusA488y4dEZTlD0vQSzctdFNpSCc785SZ7OygxszJkZ4AMbgByRnpHf/3Bx6m+E BK3w== X-Gm-Message-State: ALyK8tL1qYlmU2GPNhHyWH6zhmOG3qTfR1hyqdXfcuBSdY7YcQymWzcG+9XeE2lHjSGGgQ== X-Received: by 10.98.71.135 with SMTP id p7mr2056175pfi.165.1465972659279; Tue, 14 Jun 2016 23:37:39 -0700 (PDT) Received: from tornado.leadboat.com (c-98-248-47-228.hsd1.ca.comcast.net. [98.248.47.228]) by smtp.gmail.com with ESMTPSA id i187sm17006282pfc.62.2016.06.14.23.37.38 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 14 Jun 2016 23:37:38 -0700 (PDT) Date: Wed, 15 Jun 2016 02:37:36 -0400 From: Noah Misch To: Amit Kapila Cc: Robert Haas , Tom Lane , Peter Eisentraut , =?iso-8859-1?Q?Cl=E9ment_Pr=E9vost?= , PostgreSQL-development Subject: Re: parallel.c is not marked as test covered Message-ID: <20160615063736.GA1030423@tornado.leadboat.com> References: <20160608034342.GA804701@tornado.leadboat.com> <58cd047c-deba-0863-b279-56b931237176@2ndquadrant.com> <19903.1465923085@sss.pgh.pa.us> <20764.1465924461@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Pg-Spam-Score: -2.7 (--) 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 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