Re: [PATCH] Refactoring of LWLock tranches

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Ildus Kurbangaliev <i(dot)kurbangaliev(at)postgrespro(dot)ru>
Cc: "andres(at)anarazel(dot)de" <andres(at)anarazel(dot)de>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Subject: Re: [PATCH] Refactoring of LWLock tranches
Date: 2015-09-13 20:32:38
Message-ID: CA+TgmoYySFAdV1B2pKe6XveGOoo47EMNx8k9CGNP2ar4XdtLaA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Sep 13, 2015 at 12:43 PM, Ildus Kurbangaliev
<i(dot)kurbangaliev(at)postgrespro(dot)ru> wrote:
> Added changes related to the latest master (for individual LWLocks
> definitions)

If I haven't said this clearly enough already, I'm not OK with
changing the tranche name from char * to a fixed-size character array.
Nor am I OK with limiting the maximum number of tranches to 64. I
worked hard to set this system up so that it did not have limits on
the number of tranches or the lengths of their names, and I don't see
any good reason to add those limitations now.

I would like to avoid adding an argument to every call to
SimpleLruInit(). It's already got two arguments that are basically
names; let's avoid introducing a third one. Instead, let's decide on
a naming convention that we ca use for both locks and shared memory
segments. We haven't worried about that much in the past because this
stuff was only exposed to developers, but that's changing now. So
let's come up with something that will be nice for users and adopt a
uniform convention. I don't think it should be NameOfSubsystemLocks
as you have it here. That's too easy to confuse with heavyweight
locks.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ildus Kurbangaliev 2015-09-13 21:05:28 Re: [PATCH] Refactoring of LWLock tranches
Previous Message Robert Haas 2015-09-13 20:21:24 Re: RFC: replace pg_stat_activity.waiting with something more descriptive