pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@postgresql.org
Subject: pgsql: Add barriers to the latch code.
Date: Tue, 13 Jan 2015 12:11:29 +0000
Message-ID: <E1YB0Jl-00081h-Ch@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Add barriers to the latch code.

Since their introduction latches have required barriers in SetLatch
and ResetLatch - but when they were introduced there wasn't any
barrier abstraction. Instead latches were documented to rely on the
callsites to provide barrier semantics.

Now that the barrier support looks halfway complete, add the necessary
barriers to both latch implementations.

Also remove a now superflous lock acquisition from syncrep.c and a
superflous (and insufficient) barrier from freelist.c. There might be
other cases that can now be simplified, but those are the only ones
I've seen on a quick scan.

We might want to backpatch this at some later point, but right now the
barrier infrastructure in the backbranches isn't totally on par with
master.

Discussion: 20150112154026.GB2092@awork2.anarazel.de

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/14e8803f101a54d99600683543b0f893a2e3f529

Modified Files
--------------
src/backend/port/unix_latch.c         |   16 +++++++---------
src/backend/port/win32_latch.c        |   16 ++++++++++++++++
src/backend/replication/syncrep.c     |   10 ----------
src/backend/storage/buffer/freelist.c |    1 -
src/include/storage/latch.h           |    7 -------
5 files changed, 23 insertions(+), 27 deletions(-)


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


Message-ID: <E1YB0Jl-00081h-Ch@gemulon.postgresql.org>
Permalink:  ../E1YB0Jl-00081h-Ch@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1YB0Jl-00081h-Ch@gemulon.postgresql.org

 · 

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
  Subject: Re: pgsql: Add barriers to the latch code.
  In-Reply-To: <E1YB0Jl-00081h-Ch@gemulon.postgresql.org>
  References: <E1YB0Jl-00081h-Ch@gemulon.postgresql.org>

* 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