pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Parallel worker hangs while handling errors.
Date: Fri, 11 Sep 2020 16:20:37 -0400
Message-ID: <472666.1599855637@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoZ-T32DutyKfzoDwM=M5rXQJBGqFxE3Ud+MRozM34F=DA@mail.gmail.com>
References: <CALDaNm1d1hHPZUg3xU4XjtWBOLCrA+-2cJcLpw-cePZ=GgDVfA@mail.gmail.com>
	<CALj2ACVBLox7LvCKpWd7k-kubwrmeRFjZRTrnGHN6RZQgG4cxw@mail.gmail.com>
	<CALDaNm2g5GgBpzGgdwhFgxD=ur42O+Fh+prp-xiyHp+feB+q=w@mail.gmail.com>
	<CALj2ACX=iLQyY9-htQvvXG1ER_6wM5DELy8k5quA+gRLHDSxDA@mail.gmail.com>
	<CALDaNm04E=fbixNSqEeb4PWGdeYY26OZ-4bXNayKR2QoV6i=Yg@mail.gmail.com>
	<CALj2ACX9eUkKy3UrAv+bDx3QYdS8RLBp8Rfq8FSQHOmrXtGe1Q@mail.gmail.com>
	<CALDaNm1O1mauSawnz-He3x6PPy91H_GMqWc9gsBezejm6QuZ+w@mail.gmail.com>
	<CALj2ACWB9P6ocrzTQDTB7wT3gdtc1m7fntnPpBbNb3ZjOGiMrQ@mail.gmail.com>
	<CA+TgmoZAya0STWjtHdhr1FgeSV4EtLf69DkYFSG4ZjbHPLe7gw@mail.gmail.com>
	<CALDaNm3hi_NKnJLaiXdTZ-us50kexR-eFH0rJ5p+TjV=yeD9Og@mail.gmail.com>
	<770279.1599166903@sss.pgh.pa.us>
	<792142.1599168575@sss.pgh.pa.us>
	<CA+TgmoZ-T32DutyKfzoDwM=M5rXQJBGqFxE3Ud+MRozM34F=DA@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Sep 3, 2020 at 5:29 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Concretely, something about like this (I just did the bgwriter, but
>> we'd want the same in all the background processes).  I tried to
>> respond to Robert's complaint about the inaccurate comment just above
>> sigsetjmp, too.
>> This passes check-world, for what little that's worth.

> Seems totally reasonable from here.

OK, I did the same in other relevant places and pushed it.

It's not clear to me whether we want to institute the "accepting SIGQUIT
is always okay" rule in processes that didn't already have code to change
BlockSig.  The relevant processes are pgarch.c, startup.c, bgworker.c,
autovacuum.c (launcher and workers both), and walsender.c.  In the first
two of these I doubt it matters, because I don't think they'll ever block
signals again anyway -- they certainly don't have outer sigsetjmp blocks.
And I'm a bit hesitant to mess with bgworker given that we seem to expect
that to be heavily used by extension code, and we're exposing code to
allow extensions to mess with the signal blocking state.  On the other
hand, as long as SIGQUIT is pointing at SignalHandlerForCrashExit, it's
hard to see a reason why holding it off could be necessary.  So maybe
having a uniform rule would be good.

Any thoughts about that?

			regards, tom lane





view thread (24+ messages)  latest in thread

Message-ID: <472666.1599855637@sss.pgh.pa.us>
Permalink:  ../472666.1599855637@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/472666.1599855637@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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, vignesh21@gmail.com, bharath.rupireddyforpostgres@gmail.com, alvherre@2ndquadrant.com
  Subject: Re: Parallel worker hangs while handling errors.
  In-Reply-To: <472666.1599855637@sss.pgh.pa.us>
  References: <CALDaNm1d1hHPZUg3xU4XjtWBOLCrA+-2cJcLpw-cePZ=GgDVfA@mail.gmail.com> <CALj2ACVBLox7LvCKpWd7k-kubwrmeRFjZRTrnGHN6RZQgG4cxw@mail.gmail.com> <CALDaNm2g5GgBpzGgdwhFgxD=ur42O+Fh+prp-xiyHp+feB+q=w@mail.gmail.com> <CALj2ACX=iLQyY9-htQvvXG1ER_6wM5DELy8k5quA+gRLHDSxDA@mail.gmail.com> <CALDaNm04E=fbixNSqEeb4PWGdeYY26OZ-4bXNayKR2QoV6i=Yg@mail.gmail.com> <CALj2ACX9eUkKy3UrAv+bDx3QYdS8RLBp8Rfq8FSQHOmrXtGe1Q@mail.gmail.com> <CALDaNm1O1mauSawnz-He3x6PPy91H_GMqWc9gsBezejm6QuZ+w@mail.gmail.com> <CALj2ACWB9P6ocrzTQDTB7wT3gdtc1m7fntnPpBbNb3ZjOGiMrQ@mail.gmail.com> <CA+TgmoZAya0STWjtHdhr1FgeSV4EtLf69DkYFSG4ZjbHPLe7gw@mail.gmail.com> <CALDaNm3hi_NKnJLaiXdTZ-us50kexR-eFH0rJ5p+TjV=yeD9Og@mail.gmail.com> <770279.1599166903@sss.pgh.pa.us> <792142.1599168575@sss.pgh.pa.us> <CA+TgmoZ-T32DutyKfzoDwM=M5rXQJBGqFxE3Ud+MRozM34F=DA@mail.gmail.com> <472666.1599855637@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