Re: [HACKERS] Deadlock in XLogInsert at AIX
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Noah Misch <noah@leadboat.com>
Cc: Michael Paquier <michael.paquier@gmail.com>,
Andres Freund <andres@anarazel.de>,
Heikki Linnakangas <hlinnaka@iki.fi>,
Konstantin Knizhnik <k.knizhnik@postgrespro.ru>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>,
Bernd Helmle <mailings@oopsware.de>
Date: 2019-10-13T18:10:44Z
Lists: pgsql-hackers
Noah Misch <noah@leadboat.com> writes: > On Wed, Oct 09, 2019 at 01:15:29PM -0400, Tom Lane wrote: >> * I still think that the added configure test is a waste of build cycles. >> It'd be sufficient to test "#ifdef HAVE__BUILTIN_CONSTANT_P" where you >> are testing HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P, because our previous >> buildfarm go-round with this showed that all supported compilers >> interpret "i" this way. > xlc does not interpret "i" that way: > https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=hornet&dt=2019-09-14%2016%3A42%3A32&stg=config Hm, how'd I miss that while looking at the buildfarm results? Anyway, you're clearly right on this one --- objection withdrawn. >> * I really dislike building the asm calls with macros as you've done >> here. > For a macro local to one C file, I think readability is the relevant metric. > In particular, it would be wrong to add arguments to make these more like > header file macros. I think the macros make the code somewhat more readable, > and you think they make the code less readable. I have removed the macros. Personally I definitely find this way more readable, though I agree beauty is in the eye of the beholder. I've checked that this patch set compiles and passes regression tests on my old Apple machines, so it's good to go as far as I can see. regards, tom lane
Commits
-
For all ppc compilers, implement compare_exchange and fetch_add with asm.
- 30ee5d17c20d 13.0 landed
-
For PowerPC instruction "addi", use constraint "b".
- 930787c7fab9 9.4.25 landed
- af4477b00cf9 11.6 landed
- 62e881946c4d 9.5.20 landed
- 09d74aef33de 9.6.16 landed
- 083929372e04 10.11 landed
- ef13f914e6c2 12.1 landed
- 89b4d7744c80 13.0 landed
-
For all ppc compilers, implement pg_atomic_fetch_add_ with inline asm.
- e7ff59686eac 13.0 landed
-
Replace xlc __fetch_and_add() with inline asm.
- a1df9a015dac 9.6.16 landed
- 8972ac696665 10.11 landed
- 75941f257aac 9.5.20 landed
- 40ad4202513c 11.6 landed
- 1c6b62a7d0e5 12.0 landed
- dd50f1a43290 13.0 landed
-
Test pg_atomic_fetch_add_ with variable addend and 16-bit edge cases.
- e6a90ded5a6c 10.11 landed
- 8d32f82cbbbb 9.6.16 landed
- 4737d3a75b72 9.5.20 landed
- 5b5b0f721d9c 12.0 landed
- 585fc561f824 11.6 landed
- f380c5190134 13.0 landed