Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 3CFC417B105B for ; Fri, 11 May 2012 11:19:41 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SSqh2-00033E-HN for pgsql-bugs@postgresql.org; Fri, 11 May 2012 14:19:40 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q4BEJP9Q003643; Fri, 11 May 2012 10:19:25 -0400 (EDT) To: Heikki Linnakangas cc: Ryan Kelly , tom Tom , pgsql-bugs@postgresql.org Subject: Re: BUG #6629: Creating a gist index fails with "too many LWLocks taken" In-reply-to: <4FAD1E18.7020205@enterprisedb.com> References: <4FA7EC37.5070703@enterprisedb.com> <20120508011540.GA28140@llserver.lakeliving.com> <4FACE4C7.6070306@enterprisedb.com> <2941.1336744377@sss.pgh.pa.us> <4FAD1E18.7020205@enterprisedb.com> Comments: In-reply-to Heikki Linnakangas message dated "Fri, 11 May 2012 17:11:36 +0300" Date: Fri, 11 May 2012 10:19:25 -0400 Message-ID: <3642.1336745965@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201205/65 X-Sequence-Number: 33036 Heikki Linnakangas writes: > On 11.05.2012 16:52, Tom Lane wrote: >> IMO, no part of the system should ever get within an order of magnitude >> of holding 100 LWLocks concurrently. > I agree we should never get anywhere near that limit. But if we do - > because of another bug like this one - it would be nice if it was just > an ERROR, instead of a PANIC. By the time you hit that limit, you have already got a problem that should never have gotten into the field, I think. Simon's idea of logging a warning once we get beyond a sane number of LWLocks seems like it might be helpful towards finding such problems earlier; though I'd put the "sane" limit at maybe 20 or so. Perhaps it'd be useful to measure what the max length of that list is during the regression tests. regards, tom lane