pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: pgsql-committers <pgsql-committers@postgresql.org>
Subject: Re: pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner.
Date: Mon, 18 Apr 2016 10:58:35 -0400
Message-ID: <24612.1460991515@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoYYbYEehz9R50dMBNTc_5q7Fx9v6jug5DPpHYvCrEHaow@mail.gmail.com>
References: <E1apSHT-0007xJ-Bh@gemulon.postgresql.org>
	<9194.1460908908@sss.pgh.pa.us>
	<CA+TgmoZsjmn6xtFepN86bb8DcTzyARUT+T5wpYBpr-9rLdwvGg@mail.gmail.com>
	<CAPpHfdusvQcvN++DOXp_+JPAGv=vU4b19zP_JZa8Hdfq8Y536Q@mail.gmail.com>
	<20160418142750.p3qwwnnuacb6n7jw@alap3.anarazel.de>
	<CA+TgmoYYbYEehz9R50dMBNTc_5q7Fx9v6jug5DPpHYvCrEHaow@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Apr 18, 2016 at 10:27 AM, Andres Freund <andres@anarazel.de> wrote:
>> Personally I think the "spin" part is actually quite relevant, and I
>> think we shouldn't loose it. It describes concurrency and blocking
>> behaviour, and how errors need to be handled (i.e. there may not be
>> any).

> IMHO, "buffer header lock bit" is plenty clear enough.  We could say
> "buffer header spin lock bit" but I think that's too many words and
> not actually more clear.

I agree.  If it's just a bit, it pretty much has to be a spin lock,
because there's no way for it to contain any infrastructure that would
support anything else.  In any case, you could and should document the
exact semantics in a comment associated with the declaration of that
bit field.  It's not really necessary to repeat them in every reference,
so long as the references use a unique name that won't be confused with
other possible locking mechanisms.  (From that standpoint, "header lock
bit" might be actively better than anything including the phrase "spin
lock", since it reduces the chance of confusion with s_lock.h.)

			regards, tom lane


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



view thread (30+ messages)

Message-ID: <24612.1460991515@sss.pgh.pa.us>
Permalink:  ../24612.1460991515@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/24612.1460991515@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, andres@anarazel.de, a.korotkov@postgrespro.ru
  Subject: Re: pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner.
  In-Reply-To: <24612.1460991515@sss.pgh.pa.us>
  References: <E1apSHT-0007xJ-Bh@gemulon.postgresql.org> <9194.1460908908@sss.pgh.pa.us> <CA+TgmoZsjmn6xtFepN86bb8DcTzyARUT+T5wpYBpr-9rLdwvGg@mail.gmail.com> <CAPpHfdusvQcvN++DOXp_+JPAGv=vU4b19zP_JZa8Hdfq8Y536Q@mail.gmail.com> <20160418142750.p3qwwnnuacb6n7jw@alap3.anarazel.de> <CA+TgmoYYbYEehz9R50dMBNTc_5q7Fx9v6jug5DPpHYvCrEHaow@mail.gmail.com> <24612.1460991515@sss.pgh.pa.us>

* 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