Re: atomic reads & writes (with no barriers) - Mailing list pgsql-hackers

From Andres Freund
Subject Re: atomic reads & writes (with no barriers)
Date
Msg-id 20151204160842.GA4934@alap3.anarazel.de
Whole thread Raw
In response to atomic reads & writes (with no barriers)  (Kevin Grittner <kgrittn@gmail.com>)
List pgsql-hackers
Hi,

On 2015-12-03 16:10:51 -0600, Kevin Grittner wrote:
> Is the c.h change above on anything resembling the right track for
> a patch for this?  If not, what would such a patch look like?

I think a better path would be to add fallback support for 64bit atomics
- like we already have for 32bit. That should really only take a few
lines. Then you can use pg_atomic_read_u64/pg_atomic_write_u64 and all
the rest of the atomics api.

For that to be helpful we'd want a more efficient read/write
implementation for some platforms (falls back to compare/exchange right
now), but that's easy.

Andres



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pg_hba_lookup function to get all matching pg_hba.conf entries
Next
From: Alvaro Herrera
Date:
Subject: Re: Random crud left behind by aborted TAP tests