Re: remove volatile qualifiers from pg_stat_statements

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: remove volatile qualifiers from pg_stat_statements
Date: 2024-08-06 07:04:01
Message-ID: ZrHK4dA3Mn7Of6hW@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 31, 2024 at 07:01:38AM +0000, Bertrand Drouvot wrote:
> I share the same understanding and I think those can be removed.
>
> The patch LGTM.

That sounds about right. All the volatile references we have here
have been kept under the assumption that a memory barrier is required.
As we hold spin locks in these areas, that should not be necessary
anyway. So LGTM as well.

A quick lookup at the rest of contrib/ is showing me that the
remaining volatile references point at uses with TRY/CATCH blocks,
where we require them.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2024-08-06 07:14:17 Re: Logical Replication of sequences
Previous Message Vitaly Davydov 2024-08-06 06:41:12 Fsync (flush) all inserted WAL records