Re: WAL Insertion Lock Improvements

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: WAL Insertion Lock Improvements
Date: 2023-05-22 00:26:25
Message-ID: ZGq2sbyM26f/0KJS@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 19, 2023 at 08:34:16PM +0530, Bharath Rupireddy wrote:
> I get it. How about the following similar to what
> ProcessProcSignalBarrier() has?
>
> + * Note that pg_atomic_exchange_u64 is a full barrier, so we're guaranteed
> + * that the variable is updated before waking up waiters.
> + */
>
> + * Note that pg_atomic_exchange_u64 is a full barrier, so we're guaranteed
> + * that the variable is updated before releasing the lock.
> */
>
> Please find the attached v8 patch with the above change.

Simpler and consistent, nice. I don't have much more to add, so I
have switched the patch as RfC.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2023-05-22 01:03:11 Re: PG 16 draft release notes ready
Previous Message Michael Paquier 2023-05-22 00:19:29 Re: ERROR: wrong varnullingrels (b 5 7) (expected (b)) for Var 3/3