Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aTXmW-0004Tj-4E for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Feb 2016 16:38:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aTXmV-0001Sy-NC for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Feb 2016 16:38:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aTXlB-0008O8-Ol for pgsql-hackers@postgresql.org; Wed, 10 Feb 2016 16:36:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aTXl4-0005WP-MZ for pgsql-hackers@postgresql.org; Wed, 10 Feb 2016 16:36:57 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u1AGaaFP027481; Wed, 10 Feb 2016 11:36:36 -0500 From: Tom Lane To: Robert Haas cc: Heikki Linnakangas , "pgsql-hackers@postgresql.org" Subject: Re: [COMMITTERS] pgsql: Code cleanup in the wake of recent LWLock refactoring. In-reply-to: References: <56BB608B.10002@iki.fi> Comments: In-reply-to Robert Haas message dated "Wed, 10 Feb 2016 11:21:31 -0500" Date: Wed, 10 Feb 2016 11:36:36 -0500 Message-ID: <27480.1455122196@sss.pgh.pa.us> X-Pg-Spam-Score: -2.1 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Robert Haas writes: > On Wed, Feb 10, 2016 at 11:08 AM, Heikki Linnakangas 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