[PATCH] Refactoring of LWLock tranches

From: Ildus Kurbangaliev <i(dot)kurbangaliev(at)postgrespro(dot)ru>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Robert Haas <robertmhaas(at)gmail(dot)com>, "andres(at)anarazel(dot)de" <andres(at)anarazel(dot)de>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Subject: [PATCH] Refactoring of LWLock tranches
Date: 2015-09-05 09:48:12
Message-ID: 3F71DA37-A17B-4961-9908-016E6323E612@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello hackers!
This patch contains LWLocks changes from pg_stat_activity thread
(http://www.postgresql.org/message-id/flat/CA+TgmoYd3GTz2_mJfUHF+RPe-bCy75ytJeKVv9x-o+SonCGApw(at)mail(dot)gmail(dot)com/)
and I think it deserves a separate thread.

The goal is to split LWLocks from one array to logical pieces (with separate
tranches) for better monitoring and debug purposes. Each type of LWLock
will have its own tranche and a associated name.

I fixed problems with EXEC_BACKEND. Another parts require a some discussion so
I didn't touch them yet.

> On Sep 2, 2015, at 9:45 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Tue, Sep 1, 2015 at 6:43 PM, andres(at)anarazel(dot)de <mailto:andres(at)anarazel(dot)de> <andres(at)anarazel(dot)de <mailto:andres(at)anarazel(dot)de>> wrote:
>> Why a new tranche for each of these? And it can't be correct that each
>> has the same base?
>
> I complained about the same-base problem before. Apparently, that got ignored.

The idea to create an individual tranches for individual LWLocks have
come from Heikki Linnakangas and I also think that tranche is a good place to keep
LWLock name. Base of these tranches points to MainLWLockArray and T_ID
macros keeps the old behavior for them. But I don't insist on the current implementation
here.

----
Ildus Kurbangaliev
Postgres Professional: http://www.postgrespro.com <http://www.postgrespro.com/>
The Russian Postgres Company

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2015-09-05 10:48:01 Re: track_commit_timestamp and COMMIT PREPARED
Previous Message Simon Riggs 2015-09-05 08:53:12 Re: PATCH: index-only scans with partial indexes