Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdPAw-0002jp-Jo for pgsql-committers@arkaria.postgresql.org; Fri, 26 Aug 2016 22:00:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bdPAw-0002qB-2y for pgsql-committers@arkaria.postgresql.org; Fri, 26 Aug 2016 22:00:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bdPAv-0002q5-Q6 for pgsql-committers@postgresql.org; Fri, 26 Aug 2016 22:00:33 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bdPAs-00062U-NY; Fri, 26 Aug 2016 22:00:33 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 8DDBD2050D; Fri, 26 Aug 2016 18:00:29 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Fri, 26 Aug 2016 18:00:29 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=a8RPOeCSntL4kuGLAmRgQXI4ke0=; b=Cofj5 iLCnO+zp8AkfXmWg11L7T/4vSwGoKTX7IuXJN/3QE8zxSUmo+atCClIb4SNHu/FP 3r629rL9yeRbsZ0Tu5oOaFPXpipTlgSXtfKud+WxE8w4BD5Ay6eTLyLCE+49tkez I2ZjhsP25Hodj8o8hSk+rQOlPuGuBUX0rhAlRo= X-Sasl-enc: xyWjy0Nd/PslA0lRUpgNsSZK/63DJtXWAPaySaaM8/AU 1472248829 Received: from intern.anarazel.de (unknown [208.71.159.84]) by mail.messagingengine.com (Postfix) with ESMTPA id 07DD2F29CC; Fri, 26 Aug 2016 18:00:29 -0400 (EDT) Date: Fri, 26 Aug 2016 15:00:26 -0700 From: Andres Freund To: Robert Haas Cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Change the way that LWLocks for extensions are allocated. Message-ID: <20160826220026.2fw6xj56qgd22wqi@alap3.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org 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