Re: shared-memory based stats collector

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: alvherre(at)2ndquadrant(dot)com, andres(at)anarazel(dot)de, thomas(dot)munro(at)gmail(dot)com, tomas(dot)vondra(at)2ndquadrant(dot)com, ah(at)cybertec(dot)at, magnus(at)hagander(dot)net, robertmhaas(at)gmail(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org
Subject: Re: shared-memory based stats collector
Date: 2020-09-07 13:46:02
Message-ID: 20200907134602.GA29590@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greetings,

* Stephen Frost (sfrost(at)snowman(dot)net) wrote:
> * Kyotaro Horiguchi (horikyota(dot)ntt(at)gmail(dot)com) wrote:
> > The commit 8e19a82640 changed SIGQUIT handler of almost all processes
> > not to run atexit callbacks for safety. Archiver process should behave
> > the same way for the same reason. Exit status changes 1 to 2 but that
> > doesn't make any behavioral change.
>
> Shouldn't this:
>
> a) be back-patched, as the other change was
> b) also include a change to have the stats collector (which I realize is
> removed later on in this patch set, but we're talking about fixing
> existing things..) for the same reason, and because there isn't much
> point in trying to write out the stats after we get a SIGQUIT, since
> we're just going to blow them away again since we're going to go
> through crash recovery..?

* Michael Paquier (michael(at)paquier(dot)xyz) wrote:
> 0001 is just a piece of refactoring, so I see no strong argument in
> favor of a backpatch, IMHO.

No, 0001 changes the SIGQUIT handler for the archiver process, which is
what 8e19a82640 was about changing for a bunch of the other subprocesses
and which was back-patched all the way, so I'm a bit confused about why
you're saying it's just refactoring..?

Note that exit() and _exit() aren't the same, and the latter is what's
now being used in SignalHandlerForCrashExit.

Thanks,

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Juan José Santamaría Flecha 2020-09-07 14:03:38 Re: A micro-optimisation for walkdir()
Previous Message Justin Pryzby 2020-09-07 13:40:26 Re: PG 13 release notes, first draft