Re: valgrind versus pg_atomic_init()
Noah Misch <noah@leadboat.com>
From: Noah Misch <noah@leadboat.com>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2020-06-17T04:01:21Z
Lists: pgsql-hackers
On Tue, Jun 16, 2020 at 08:35:58PM -0700, Andres Freund wrote: > On June 16, 2020 8:24:29 PM PDT, Noah Misch <noah@leadboat.com> wrote: > >Suppose the initializing process does: > > > > pg_atomic_init_u64(&somestruct->atomic, 123); > > somestruct->atomic_ready = true; > > > >In released versions, any process observing atomic_ready==true will > >observe > >the results of the pg_atomic_init_u64(). After the commit from this > >thread, > >that's no longer assured. > > Why did that hold true before? There wasn't a barrier in platforms already (wherever we know what 64 bit reads/writes have single copy atomicity). You are right. It didn't hold before.
Commits
-
Avoid need for valgrind suppressions for pg_atomic_init_u64 on some platforms.
- 3801532918eb 9.5.23 landed
- e3c878ffdddc 9.6.19 landed
- 20fd90febc2c 10.14 landed
- fd6daa006e7b 11.9 landed
- 980a3cd48a08 12.4 landed
- de4a25989611 13.0 landed
- 47c718792b88 14.0 landed