From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | John Gorman <johngorman2(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Status of 64 bit atomics |
Date: | 2016-05-27 20:05:12 |
Message-ID: | 20160527200512.tgw4kp3lihvcymvn@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2016-05-27 11:00:42 -0400, John Gorman wrote:
> Someone recently told me that the postgresql atomics library was incomplete
> for 64 bit operations such as pg_atomic_fetch_add_u64() and should not be
> used.
There's currently no fallback for 32bit platforms without 64bit atomics
support. I posted a patch adding that fallback, which I plan to commit
soon after the start of the 9.7 development window opens.
> Can someone definitively confirm whether it is okay to rely on the 64
> bit atomics or whether it is better to protect 64 bit operations with
> a spinlock?
For current versions 64bit atomics are working, but you'll get
compilation errors if the platform doesn't have 64bit atomics
support. That's not actually many CPUs these days; most prominent are
probably older arm CPUs.
Andres
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-05-27 20:13:04 | Re: [PROPOSAL] Move all am-related reloption code into src/backend/access/[am-name] and get rid of relopt_kind |
Previous Message | Arthur Silva | 2016-05-27 20:00:20 | Re: Status of 64 bit atomics |