Re: [PATCH] Refactoring of LWLock tranches - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [PATCH] Refactoring of LWLock tranches
Date
Msg-id 20151119212649.GB6092@alap3.anarazel.de
Whole thread Raw
In response to Re: [PATCH] Refactoring of LWLock tranches  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [PATCH] Refactoring of LWLock tranches  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 2015-11-19 14:58:05 -0500, Robert Haas wrote:
> On Thu, Nov 19, 2015 at 11:30 AM, Andres Freund <andres@anarazel.de> wrote:
> > It's really not particularly convenient to allocate tranches right
> > now. You have to store at least the identifier in shared memory and
> > then redo the registration in each process. Otherwise some processes
> > can't identify them. Which of rather inconvenient of you want to
> > register some at runtime
>
> Sure, that's why we're proposing to use an enum or a list of #defines
> for that.  I don't see a need to do any more than that.

That works fine for builtin stuff, but not at all for extensions doing
it.

If you do register locks at runtime, instead of shared_preload_library -
something you surely agree makes some things easier by not requiring a
restart - you really don't have any way to force the registration to
happen in each backend.



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: Bug in numeric multiplication
Next
From: Robert Haas
Date:
Subject: Re: [PATCH] Refactoring of LWLock tranches