]> 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:48:04 +0000 (22:48 -0500)
commit377a1af56a5ad6e5c47e0a5141abbd912169f750
treee982975c4b5cc920213f4882c999013960c66dd7
parentc479024d325a02e0eb352e5b7f1873b4c51a5205
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