pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: David Rowley <david.rowley@2ndquadrant.com>
Cc: Nikolay Samokhvalov <samokhvalov@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: Sudden FTS-related error from parallel worker in 9.6
Date: Mon, 10 Oct 2016 11:40:29 -0400
Message-ID: <1876.1476114029@sss.pgh.pa.us> (raw)
In-Reply-To: <CAA4eK1JquS4_zSiEAPJGNBJ2P-d5iVPM_NFFQHmAQmgngMKBrA@mail.gmail.com>
References: <CANNMO+JkykPUbPzXraZ_oPUeqcUOK1SMo2kjGhLbeQqDL45L2Q@mail.gmail.com>
	<CAKJS1f85+qGh_tUKxj-TbTfY9+WabfXrAxP4HvG8-5HsCfpP8Q@mail.gmail.com>
	<CAA4eK1LoKN1CpvTifSej+hXfG5ttD=KRf-PSHJNaBbmTRGzMMA@mail.gmail.com>
	<14354.1475905437@sss.pgh.pa.us>
	<CAA4eK1JquS4_zSiEAPJGNBJ2P-d5iVPM_NFFQHmAQmgngMKBrA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Amit Kapila <amit.kapila16@gmail.com> writes:
> On Sat, Oct 8, 2016 at 11:13 AM, Tom Lane <tgl@sss.pgh.pa.us> 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



view thread (15+ messages)  latest in thread

Message-ID: <1876.1476114029@sss.pgh.pa.us>
Permalink:  ../1876.1476114029@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1876.1476114029@sss.pgh.pa.us

 · 

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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, amit.kapila16@gmail.com, david.rowley@2ndquadrant.com, samokhvalov@gmail.com
  Subject: Re: Sudden FTS-related error from parallel worker in 9.6
  In-Reply-To: <1876.1476114029@sss.pgh.pa.us>
  References: <CANNMO+JkykPUbPzXraZ_oPUeqcUOK1SMo2kjGhLbeQqDL45L2Q@mail.gmail.com> <CAKJS1f85+qGh_tUKxj-TbTfY9+WabfXrAxP4HvG8-5HsCfpP8Q@mail.gmail.com> <CAA4eK1LoKN1CpvTifSej+hXfG5ttD=KRf-PSHJNaBbmTRGzMMA@mail.gmail.com> <14354.1475905437@sss.pgh.pa.us> <CAA4eK1JquS4_zSiEAPJGNBJ2P-d5iVPM_NFFQHmAQmgngMKBrA@mail.gmail.com> <1876.1476114029@sss.pgh.pa.us>

* 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