pgsql: Fix pg_atomic_u64 initialization.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix pg_atomic_u64 initialization.
Date: 2017-08-16 21:49:32
Message-ID: E1di6Bw-0003nH-Kl@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix pg_atomic_u64 initialization.

As Andres pointed out, pg_atomic_init_u64 must be used to initialize an
atomic variable, before it can be accessed with the actual atomic ops.
Trying to use pg_atomic_write_u64 on an uninitialized variable leads to a
failure with the fallback implementation that uses a spinlock.

Discussion: https://www.postgresql.org/message-id/20170816191346.d3ke5tpshhco4bnd%40alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dcd052c8d20c5359c55f2a101f10a8e6341233cd

Modified Files
--------------
src/backend/access/heap/heapam.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2017-08-16 23:50:09 pgsql: pg_dump: Support using synchronized snapshots on standbys
Previous Message Tom Lane 2017-08-16 20:52:01 pgsql: Extend the default rules file for contrib/unaccent with Vietname