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: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [COMMITTERS] pgsql: Code cleanup in the wake of recent LWLock refactoring.
Date: Wed, 10 Feb 2016 11:36:36 -0500
Message-ID: <27480.1455122196@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoabXpECmAGD-G22Z9Gf9_fCVB3xpFVAUykBHUYckyQSyg@mail.gmail.com>
References: <E1aTWRp-0001Ss-Vv@gemulon.postgresql.org>
	<56BB608B.10002@iki.fi>
	<CA+TgmoabXpECmAGD-G22Z9Gf9_fCVB3xpFVAUykBHUYckyQSyg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Feb 10, 2016 at 11:08 AM, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
>> (Sorry if this was discussed already, I haven't been paying attention)
>> 
>> LWLockAssign() is used by extensions. Are we OK with just breaking them,
>> requiring them to change LWLockAssign() with the new mechanism, with #ifdefs
>> to support multiple server versions? Seems like it shouldn't be too hard to
>> keep LWLockAssign() around for the benefit of extensions, so it seems a bit
>> inconsiderate to remove it.

> If there's a strong feeling that we should keep the old APIs around,
> we can do that, but I think that (1) if we don't remove them now, we
> probably never will and (2) they are vile APIs.  Allocating the number
> of add-in lwlocks that are requested or a minimum of 3 is just awful.
> If somebody allocates a different number than they request it
> sometimes works, except when combined with some other extension, when
> it maybe doesn't work.  This way, you ask for an LWLock under a given
> name and then get it under that name, so if an extension does it
> wrong, it is that extension that breaks rather than some other one.  I
> think that's enough benefit to justify requiring a small code change
> on the part of extension authors that use LWLocks, but that's
> obviously biased by my experience maintaining EDB's extensions, and
> other people may well feel differently.

FWIW, I wasn't paying attention either, but I'm convinced by Robert's
argument.  Avoiding coupling between extensions is worth an API break.

			regards, tom lane


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

Message-ID: <27480.1455122196@sss.pgh.pa.us>
Permalink:  ../27480.1455122196@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27480.1455122196@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, hlinnaka@iki.fi, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Code cleanup in the wake of recent LWLock refactoring.
  In-Reply-To: <27480.1455122196@sss.pgh.pa.us>
  References: <E1aTWRp-0001Ss-Vv@gemulon.postgresql.org> <56BB608B.10002@iki.fi> <CA+TgmoabXpECmAGD-G22Z9Gf9_fCVB3xpFVAUykBHUYckyQSyg@mail.gmail.com> <27480.1455122196@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