Re: Can a child process detect postmaster death when in pg_usleep?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Can a child process detect postmaster death when in pg_usleep?
Date: 2021-06-28 15:01:57
Message-ID: 162764.1624892517@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> writes:
> On Thu, Jun 24, 2021 at 12:04 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>> On top of that, not reacting on signals can be
>> interesting to keep as a behavior for developers?

> Yeah, it can be useful at times as it enables debugging even when the
> postmaster dies.

Dunno ... I cannot recall ever having had that as a debugging requirement
in a couple of decades worth of PG bug-chasing. If the postmaster is
dying, you generally want to deal with that before bothering with child
processes. Moreover, child processes that don't go awy when the
postmaster does are a very nasty problem, because they could screw up
subsequent debugging work.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2021-06-28 15:43:01 Re: code fork June 28th
Previous Message Tom Lane 2021-06-28 14:56:30 Re: pgindent run