Re: Use WaitLatch for {pre, post}_auth_delay instead of pg_usleep - Mailing list pgsql-hackers

From Bharath Rupireddy
Subject Re: Use WaitLatch for {pre, post}_auth_delay instead of pg_usleep
Date
Msg-id CALj2ACVxqfLoabFG5_gPYaS=ibZC2qSPTintazYP8yn40psaSQ@mail.gmail.com
Whole thread Raw
In response to Re: Use WaitLatch for {pre, post}_auth_delay instead of pg_usleep  ("Bossart, Nathan" <bossartn@amazon.com>)
Responses Re: Use WaitLatch for {pre, post}_auth_delay instead of pg_usleep  ("Bossart, Nathan" <bossartn@amazon.com>)
Re: Use WaitLatch for {pre, post}_auth_delay instead of pg_usleep  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-hackers
On Mon, Jul 26, 2021 at 11:03 PM Bossart, Nathan <bossartn@amazon.com> wrote:
> > For PreAuthDelay, with the comment I wanted to say that the MyLatch is
> > not the correct one we would want to wait for. Since there is no
> > problem in using it there, I changed the comment to following:
> >         /*
> >          * Let's not use WL_LATCH_SET for PreAuthDelay to be consistent with
> >          * PostAuthDelay.
> >          */
>
> How about we elaborate a bit?
>
>         WL_LATCH_SET is not used for consistency with PostAuthDelay.
>         MyLatch isn't fully initialized for the backend at this point,
>         anyway.

+1.

> +               /*
> +                * PostAuthDelay will not get applied, if WL_LATCH_SET is used. This
> +                * is because the latch could have been set initially.
> +                */
>
> I would suggest the following:
>
>         If WL_LATCH_SET is used, PostAuthDelay may not be applied,
>         since the latch might already be set.

+1.

> Otherwise, this patch looks good and could probably be marked ready-
> for-committer.

PSA v3 patch.

Regards,
Bharath Rupireddy.

Attachment

pgsql-hackers by date:

Previous
From: Ronan Dunklau
Date:
Subject: Re: ORDER BY pushdowns seem broken in postgres_fdw
Next
From: "Andrey V. Lepikhov"
Date:
Subject: Re: Removing unneeded self joins