pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Robert Haas <rhaas@postgresql.org>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Change the way that LWLocks for extensions are allocated.
Date: Fri, 26 Aug 2016 15:00:26 -0700
Message-ID: <20160826220026.2fw6xj56qgd22wqi@alap3.anarazel.de> (raw)
In-Reply-To: <E1aRRgI-00022x-UD@gemulon.postgresql.org>
References: <E1aRRgI-00022x-UD@gemulon.postgresql.org>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Hi,

On 2016-02-04 21:43:14 +0000, Robert Haas wrote:
> Change the way that LWLocks for extensions are allocated.
> 
> The previous RequestAddinLWLocks() method had several disadvantages.
> First, the locks would be in the main tranche; we've recently decided
> that it's useful for LWLocks used for separate purposes to have
> separate tranche IDs.  Second, there wasn't any correlation between
> what code called RequestAddinLWLocks() and what code called
> LWLockAssign(); when multiple modules are in use, it could become
> quite difficult to troubleshoot problems where LWLockAssign() ran out
> of locks.  To fix, create a concept of named LWLock tranches which
> can be used either by extension or by core code.
> 
> Amit Kapila and Robert Haas

I noticed that this code has no test coverage:

http://coverage.postgresql.org/src/backend/storage/lmgr/lwlock.c.gcov.html

It'd be good to add some, although I'm not entirely sure what the best
way is. Maybe add a simple pg_stat_statements test?

Andres


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



view thread (21+ messages)  latest in thread

Message-ID: <20160826220026.2fw6xj56qgd22wqi@alap3.anarazel.de>
Permalink:  ../20160826220026.2fw6xj56qgd22wqi@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20160826220026.2fw6xj56qgd22wqi@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, rhaas@postgresql.org
  Subject: Re: pgsql: Change the way that LWLocks for extensions are allocated.
  In-Reply-To: <20160826220026.2fw6xj56qgd22wqi@alap3.anarazel.de>
  References: <E1aRRgI-00022x-UD@gemulon.postgresql.org> <20160826220026.2fw6xj56qgd22wqi@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox