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

From Robert Haas
Subject Re: [PATCH] Refactoring of LWLock tranches
Date
Msg-id CA+TgmoakA_HnaKTNDnq2PQ5cyGepp4Ww_a3fEv6kQEUnL8-Fww@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Refactoring of LWLock tranches  (Ildus Kurbangaliev <i.kurbangaliev@postgrespro.ru>)
Responses Re: [PATCH] Refactoring of LWLock tranches  (Ildus Kurbangaliev <i.kurbangaliev@postgrespro.ru>)
List pgsql-hackers
On Wed, Nov 11, 2015 at 6:50 AM, Ildus Kurbangaliev
<i.kurbangaliev@postgrespro.ru> wrote:
> Attached a new version of the patch that moves SLRU tranches and LWLocks to
> SLRU control structs.
>
> `buffer_locks` field now contains LWLocks itself, so we have some economy of
> the memory here. `pstrdup` removed in SimpleLruInit. I didn't
> change names from the previous patch yet, but I don't mind if they'll
> be changed.

I've committed this with some modifications.  I did a little bit of
renaming, and I stored a copy of the SLRU name in shared memory.
Otherwise, we're relying on the fact that a static string will be at
the same backend-private address in every process, which is a
dangerous assumption at best.

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



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: psql: add \pset true/false
Next
From: "David G. Johnston"
Date:
Subject: Re: psql: add \pset true/false