Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btchX-00036z-F5 for pgsql-bugs@arkaria.postgresql.org; Mon, 10 Oct 2016 15:41:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1btchW-0007ll-Th for pgsql-bugs@arkaria.postgresql.org; Mon, 10 Oct 2016 15:41:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1btcgs-00073e-PV for pgsql-bugs@postgresql.org; Mon, 10 Oct 2016 15:40:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1btcgq-0002gu-4d for pgsql-bugs@postgresql.org; Mon, 10 Oct 2016 15:40:34 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u9AFeTbO001877; Mon, 10 Oct 2016 11:40:29 -0400 From: Tom Lane To: Amit Kapila cc: David Rowley , Nikolay Samokhvalov , PostgreSQL mailing lists Subject: Re: Sudden FTS-related error from parallel worker in 9.6 In-reply-to: References: <14354.1475905437@sss.pgh.pa.us> Comments: In-reply-to Amit Kapila message dated "Sat, 08 Oct 2016 12:08:14 +0530" Date: Mon, 10 Oct 2016 11:40:29 -0400 Message-ID: <1876.1476114029@sss.pgh.pa.us> X-Pg-Spam-Score: -2.2 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Amit Kapila writes: > On Sat, Oct 8, 2016 at 11:13 AM, Tom Lane wrote: >> The mechanism needs to be fixed so that the worker absorbs EXACTLY the >> settings that prevail in the parent, no matter what is currently in >> postgresql.conf. > Hmm, currently the leader process serialize the guc values that > prevail before the launch of workers and then workers restore those > values (refer SerializeGUCState and RestoreGUCState). I am not sure > what makes you think that we are doing something else. OK, I'd misunderstood the problem --- I supposed that the worker was getting the bad value directly from postgresql.conf, but I now see that that's not happening; the bad value is in place in the leader, and the worker is failing to accept it when it's passed over. This evidently goes back to the comment you made before: >> The validation is done at postmaster startup time as well, but there >> are few differences. First is during postmaster startup, we are not >> in any transaction whereas while restoring GUC's in worker we are in a >> transaction, this error is mainly due to that reason (refer >> check_TSCurrentConfig()). So I guess the question is why in the world are we doing that inside a transaction. Seems like a waste of cycles as well as a cause of inappropriate failures. Or in other words, my comment above still holds, mutatis mutandis: the worker should absorb EXACTLY the settings that prevail in the parent, even if they're nominally invalid. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs