]> granicus.if.org Git - postgresql/commit
Call xlc __isync() after, not before, associated compare-and-swap.
authorNoah Misch <noah@leadboat.com>
Sat, 20 Feb 2016 03:47:50 +0000 (22:47 -0500)
committerNoah Misch <noah@leadboat.com>
Sat, 20 Feb 2016 03:47:50 +0000 (22:47 -0500)
commit5882ca66868e1f6fe287dfb41ebaab0bcb1784b2
treed822057f90081b807a71385ecaa836a0c16ee605
parent481725c0ba731b77fb32cadb12013373e378011a
Call xlc __isync() after, not before, associated compare-and-swap.

Architecture reference material specifies this order, and s_lock.h
inline assembly agrees.  The former order failed to provide mutual
exclusion to lwlock.c and perhaps to other clients.  The two xlc
buildfarm members, hornet and mandrill, have failed sixteen times with
duplicate key errors involving pg_class_oid_index or pg_type_oid_index.
Back-patch to 9.5, where commit b64d92f1a5602c55ee8b27a7ac474f03b7aee340
introduced atomics.

Reviewed by Andres Freund and Tom Lane.
src/bin/pgbench/.gitignore
src/bin/pgbench/Makefile
src/bin/pgbench/t/001_pgbench.pl [new file with mode: 0644]
src/include/port/atomics/generic-xlc.h
src/tools/msvc/clean.bat