Re: Use WaitLatch for {pre, post}_auth_delay instead of pg_usleep

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Use WaitLatch for {pre, post}_auth_delay instead of pg_usleep
Date: 2021-07-15 14:26:47
Message-ID: CALj2ACUpBhxg7=3a8qnP_QRYMw7zWFfHwR8dRv9xFih7fMvUyg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 12, 2021 at 9:26 PM Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
>
> Hi,
>
> As suggested in [1], starting a new thread for discussing $subject
> separately. {pre, post}_auth_delay waiting logic currently uses
> pg_usleep which can't detect postmaster death. So, there are chances
> that some of the backends still stay in the system even when a
> postmaster crashes (for whatever reasons it may be). Please have a
> look at the attached patch that does $subject. I pulled out some of
> the comments from the other thread related to the $subject, [2], [3],
> [4], [5].
>
> [1] - https://www.postgresql.org/message-id/YOv8Yxd5zrbr3k%2BH%40paquier.xyz
> [2] - https://www.postgresql.org/message-id/162764.1624892517%40sss.pgh.pa.us
> [3] - https://www.postgresql.org/message-id/20210705.145251.462698229911576780.horikyota.ntt%40gmail.com
> [4] - https://www.postgresql.org/message-id/flat/20210705155553.GD20766%40tamriel.snowman.net
> [5] - https://www.postgresql.org/message-id/YOOnlP4NtWVzfsyb%40paquier.xyz

I added this to the commitfest - https://commitfest.postgresql.org/34/3255/

Regards,
Bharath Rupireddy.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2021-07-15 14:27:54 Re: What are exactly bootstrap processes, auxiliary processes, standalone backends, normal backends(user sessions)?
Previous Message Bharath Rupireddy 2021-07-15 14:24:41 Re: Inaccurate error message when set fdw batch_size to 0