pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: Andres Freund <andres@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Geoghegan <pg@heroku.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Cc: Ants Aasma <ants@cybertec.at>
Subject: Re: better atomics - v0.5
Date: Mon, 30 Jun 2014 21:46:26 -0400
Message-ID: <20140701014626.GB1547033@tornado.leadboat.com> (raw)
In-Reply-To: <20140630174447.GL21422@awork2.anarazel.de>
References: <54412.1403808435@sss.pgh.pa.us>
	<20140626190405.GA21422@awork2.anarazel.de>
	<CA+TgmoZjAiqjg40364uSkyh8c7iib_VbvsTDuwG2d-rX8p1BeA@mail.gmail.com>
	<20140627180033.GF18288@awork2.anarazel.de>
	<CA+TgmoZBnU7UcDRw1_Mgu3nW3RQ1OeSGecO_--Br7f5gz0GUrA@mail.gmail.com>
	<20140628082559.GB6450@awork2.anarazel.de>
	<CA+TgmoYd1BKsbvqPuCQuQb6+9znVLgjhJTvLo9tS=FuY1jXw0Q@mail.gmail.com>
	<11914.1404147250@sss.pgh.pa.us>
	<CA+TgmobLpKZU0TWOmg8kGFBjhszxiexQpDEmcUBm10-1eLZgUg@mail.gmail.com>
	<20140630174447.GL21422@awork2.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On Mon, Jun 30, 2014 at 07:44:47PM +0200, Andres Freund wrote:
> On 2014-06-30 13:15:23 -0400, Robert Haas wrote:
> > I'm personally not convinced that we're approaching this topic in the
> > right way.  I'm not convinced that it's at all reasonable to try to
> > emulate atomics on platforms that don't have them.  I would punt the
> > problem into the next layer and force things like lwlock.c to have
> > fallback implementations at that level that don't require atomics, and
> > remove those fallback implementations if and when we move the
> > goalposts so that all supported platforms must have working atomics
> > implementations.
> 
> If we're requiring a atomics-less implementation for lwlock.c,
> bufmgr. et al. I'll stop working on those features (and by extension on
> atomics). It's an utter waste of resources and maintainability trying to
> maintain parallel high level locking algorithms in several pieces of the
> codebase. The nonatomic versions will stagnate and won't actually work
> under load. I'd rather spend my time on something useful. The spinlock
> based atomics emulation is *small*. It's easy to reason about
> correctness there.
> 
> If we're going that way, we've made a couple of absolute fringe
> platforms hold postgres, as actually used in reality, hostage. I think
> that's insane.

I agree completely.

> > If this patch goes in
> > the way it's written right now, then I think it basically amounts to
> > throwing platforms that don't have working atomics emulation under the
> > bus

> >, and my vote is that if we're going to do that, we should do it
> > explicitly: sorry, we now only support platforms with working atomics.
> > You don't have any, so you can't run PostgreSQL.  Have a nice day.

I might share that view if a platform faced a huge and easily-seen performance
regression, say a 40% regression to 5-client performance.  I don't expect the
shortfall to reach that ballpark for any atomics-exploiting algorithm we'll
adopt, and your (Andres's) latest measurements corroborate that.

-- 
Noah Misch
EnterpriseDB                                 http://www.enterprisedb.com


-- 
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 (58+ messages)  latest in thread

Message-ID: <20140701014626.GB1547033@tornado.leadboat.com>
Permalink:  ../20140701014626.GB1547033@tornado.leadboat.com/
Also on:    postgresql.org/message-id/20140701014626.GB1547033@tornado.leadboat.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: noah@leadboat.com, andres@2ndquadrant.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, pg@heroku.com, ants@cybertec.at
  Subject: Re: better atomics - v0.5
  In-Reply-To: <20140701014626.GB1547033@tornado.leadboat.com>

* 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