Re: Deadlock in XLogInsert at AIX

Konstantin Knizhnik <k.knizhnik@postgrespro.ru>

From: Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
To: Heikki Linnakangas <hlinnaka@iki.fi>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: Bernd Helmle <mailings@oopsware.de>
Date: 2017-02-01T15:40:33Z
Lists: pgsql-hackers

Attachments


On 01.02.2017 15:39, Heikki Linnakangas wrote:
>
> In summary, I came up with the attached. It's essentially your patch, 
> with tweaks for the above-mentioned things. I don't have a powerpc 
> system to test on, so there are probably some silly typos there.
>

Attached pleased find fixed version of your patch.
I verified that it is correctly applied, build and postgres normally 
works with it.


-- 
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Commits

  1. For all ppc compilers, implement compare_exchange and fetch_add with asm.

  2. For PowerPC instruction "addi", use constraint "b".

  3. For all ppc compilers, implement pg_atomic_fetch_add_ with inline asm.

  4. Replace xlc __fetch_and_add() with inline asm.

  5. Test pg_atomic_fetch_add_ with variable addend and 16-bit edge cases.