Re: Trying out - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Trying out
Date
Msg-id 536409d2-c9df-4ef3-808d-1ffc3182868c@iki.fi
Whole thread Raw
In response to Trying out  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Trying out
Re: Trying out
List pgsql-hackers
On 10/11/2025 15:17, Thomas Munro wrote:
> Hi,
> 
> Here is an experimental patch to try out standard C (and C++) atomics
> to implement port/atomics.h, and also add more types and operations.
> It's mostly just redirecting our names to the standard ones, except
> for our barriers and slightly extended pg_atomic_flag, so there isn't
> much left of the code.

>  9 files changed, 166 insertions(+), 1824 deletions(-)
>  ...
>  8 files changed, 176 insertions(+), 881 deletions(-)
>  ...
>  7 files changed, 1 insertion(+), 394 deletions(-)

Nice!

> [PATCH v1 1/4] Add some missing #include <limits.h>.

This seems like a good thing regardless of the other patches.

The "#include <limits.h>" lines in src/backend/lib/dshash.c and 
src/backend/storage/lmgr/condition_variable.c are slightly misplaced: 
system headers should be included between "postgres.h" and other 
postgres headers.

> Here also is a semi-independent patch to implement storage/spin.h with
> pg_atomic_flag.  It keeps a small amount of the architecture-specific
> magic, but moves it out to src/port/spin_delay.h.

Makes sense.

The patch removes 'src/template/solaris'. Is that on purpose? Is that an 
independent cleanup that could be committed immediately?

- Heikki




pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: Minor adjustment: Update the range of the commit_siblings parameter.
Next
From: Daniel Gustafsson
Date:
Subject: Re: Add tests for object size limits of injection points