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

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
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-07-05 16:12:29
Message-ID: CALj2ACW1cBkmcLr0uLcT5smrDTTF-0Hmb_OpWWjxjPFmRkXK3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 5, 2021 at 9:25 PM Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> In general, I agree with Tom's up-thread comment about children hanging
> around after postmaster death making things more difficult for debugging
> and just in general, so I'm in favor of trying to eliminate as many
> cases where that's happening as we reasonably can without impacting
> performance by checking too often.

I agree. I'm attaching the patch that replaces pg_usleep with
WaitLatch for {pre, post}_auth_delay. I'm also attaching Michael's
latest patch stop-backup-latch-v2.patch, just for the sake of cfbot.

Regards,
Bharath Rupireddy.

Attachment Content-Type Size
stop-backup-latch-v2.patch application/octet-stream 707 bytes
v1-0003-Use-a-WaitLatch-for-Pre-and-Post-Auth-Delay.patch application/octet-stream 6.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-07-05 16:45:05 Re: Removed extra memory allocations from create_list_bounds
Previous Message Bharath Rupireddy 2021-07-05 16:04:15 Re: Can a child process detect postmaster death when in pg_usleep?