pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Re: [COMMITTERS] pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner.
Date: Mon, 11 Apr 2016 21:03:35 -0700
Message-ID: <20160412040335.7melgsixigrhr656@alap3.anarazel.de> (raw)
In-Reply-To: <3181.1460433561@sss.pgh.pa.us>
References: <E1apSHT-0007xJ-Bh@gemulon.postgresql.org>
	<1881.1460431476@sss.pgh.pa.us>
	<20160412033618.c56ksvf3me4mpwii@alap3.anarazel.de>
	<2490.1460432470@sss.pgh.pa.us>
	<20160412034704.oowjuayv5kfn3guc@alap3.anarazel.de>
	<3181.1460433561@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 2016-04-11 23:59:21 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > Will fix (both initialization and use of pg_atomic_fetch_or_u32), and
> > expand the documentation on why only atomic read/write are supposed to
> > be used.
> 
> FWIW, I'd vote against adding a SpinLockInit there.

Well, it'd not be a SpinLockInit, but a pg_atomic_init_u32(), but ...

> What it would mostly
> do is prevent noticing future mistakes of the same ilk.  It would be
> better no doubt if we didn't have to rely on a nearly-dead platform
> to detect this; but having such detection of a performance bug is better
> than having no detection.

Ok, works for me as well. I guess it'd be useful to add a "modern"
animal that disables spinlocks & atomics...

- Andres


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (30+ messages)  latest in thread

Message-ID: <20160412040335.7melgsixigrhr656@alap3.anarazel.de>
Permalink:  ../20160412040335.7melgsixigrhr656@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20160412040335.7melgsixigrhr656@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner.
  In-Reply-To: <20160412040335.7melgsixigrhr656@alap3.anarazel.de>
  References: <E1apSHT-0007xJ-Bh@gemulon.postgresql.org> <1881.1460431476@sss.pgh.pa.us> <20160412033618.c56ksvf3me4mpwii@alap3.anarazel.de> <2490.1460432470@sss.pgh.pa.us> <20160412034704.oowjuayv5kfn3guc@alap3.anarazel.de> <3181.1460433561@sss.pgh.pa.us> <20160412040335.7melgsixigrhr656@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox