Re: Trying out <stdatomic.h>

From: "Greg Burd" <greg(at)burd(dot)me>
To: "Peter Eisentraut" <peter(at)eisentraut(dot)org>, "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Thomas Munro" <thomas(dot)munro(at)gmail(dot)com>, "Nathan Bossart" <nathandbossart(at)gmail(dot)com>, "Heikki Linnakangas" <hlinnaka(at)iki(dot)fi>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Trying out <stdatomic.h>
Date: 2026-09-14 19:02:33
Message-ID: cae320c9-6882-47c0-8d06-8ff8ab48aafb@app.fastmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Mon, Sep 14, 2026, at 2:48 PM, Peter Eisentraut wrote:
> On 10.09.26 16:10, Greg Burd wrote:
>> 1. Is an opt-in, default-off second implementation worth carrying at
>> all? Tom's concern was that this not become The Only Way, hence the
>> default. If the answer is no, that's fine and I'll stop pushing.
>
> Depends on what the plan in the long term is. Just having another
> variant available at compile time doesn't accomplish much by itself.
> Except that we'd now have even more code to maintain. What are we
> asking people to do with it? Are we asking for testing? (What kind?)
> What do we do when the testing is complete?
>
> Personally, I think a possible valuable outcome would be that we don't
> have to maintain our own atomics library at all anymore, and just rely
> on the compiler. This would require, most likely, some intermediate
> steps and some testing and so on, but it would be good to clarify what
> those steps are and whether this is indeed the goal.

Hey Peter, thanks for the reply.

I agree, high level end game goal is to move entirely to stdatomic and remove the atomics we've been maintaining.

I'd imagined we could do that "testing and so on" while we leave them both in tree and then cut over mid-cycle if all looks good. I'm open to other ideas. I'm happy to try to split this up or ease it into the tree, suggestions welcome.

best.

-greg

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Burd 2026-09-14 19:19:43 Re: [PATCH] Corruption Issue: Fix missing tts_tid in ExecForceStoreHeapTuple
Previous Message Peter Eisentraut 2026-09-14 19:01:27 Re: Translation of the NextOID message in pg_controldata