Re: PostmasterContext survives into parallel workers!?

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PostmasterContext survives into parallel workers!?
Date: 2016-08-01 22:54:35
Message-ID: 20160801225435.jgltryqui3cca2xh@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2016-08-01 18:28:44 -0400, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > On 2016-08-01 18:09:03 -0400, Robert Haas wrote:
> >> (Also vaguely on the list of things to clean up: can't we make it so
> >> that bgworkers aren't launched from inside a signal handler? Blech.)
>
> > Isn't pretty much everything on-demand below postmaster started from a
> > signal handler?
>
> I think it depends. As an example, maybe_start_bgworker is called
> from PostmasterMain, *and* from ServerLoop, *and* from reaper,
> *and* from sigusr1_handler. That's likely excessive, but it's what
> we've got at the moment.

Personally I think the whole logic should be reworked so we do most of
that that only from one place. Especially the signal handler stuff
should imo just be replaced by setting latch, which then does the work
inside the normal main loop.

Andres

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-08-01 23:21:23 Re: PostmasterContext survives into parallel workers!?
Previous Message Alvaro Herrera 2016-08-01 22:50:33 Re: PostmasterContext survives into parallel workers!?