Re: Memory ordering issue in LWLockRelease, WakeupWaiters, WALInsertSlotRelease - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Memory ordering issue in LWLockRelease, WakeupWaiters, WALInsertSlotRelease
Date
Msg-id 20140215111103.GB20973@alap3.anarazel.de
Whole thread Raw
In response to Re: Memory ordering issue in LWLockRelease, WakeupWaiters, WALInsertSlotRelease  (Florian Pflug <fgp@phlo.org>)
Responses Re: Memory ordering issue in LWLockRelease, WakeupWaiters, WALInsertSlotRelease  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2014-02-15 04:20:17 +0100, Florian Pflug wrote:
> Another idea would be to do as you suggest and only mark the PGPROC pointers
> volatile, but to additionally add a check for queue corruption somewhere. We should
> be able to detect that - if we ever hit this issue, LWLockRelease should find a
> PGPROC while traversing the queue whose lwWaitLink is NULL but which isn't equal to
> lock->tail. If that ever happens, we'd simply PANIC.

My current conclusion is that backporting barriers.h is by far the most
reasonable way to go. The compiler problems have been ironed out by
now...
Arguments against?

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Ctrl+C from sh can shut down daemonized PostgreSQL cluster
Next
From: Andres Freund
Date:
Subject: Re: Patch: show xid and xmin in pg_stat_activity and pg_stat_replication