X-Original-To: pgsql-hackers-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id ACADD9FB1E0 for ; Thu, 14 Sep 2006 13:02:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 23851-03 for ; Thu, 14 Sep 2006 16:02:11 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from lists.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id 9BFDF9FB1DF for ; Thu, 14 Sep 2006 13:02:08 -0300 (ADT) Received: from [192.168.1.50] (or-67-76-146-141.sta.embarqhsd.net [67.76.146.141]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id k8EG1wWR001060 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Sep 2006 09:01:59 -0700 Message-ID: <45097CF4.7040409@commandprompt.com> Date: Thu, 14 Sep 2006 09:01:56 -0700 From: "Joshua D. Drake" Organization: Command Prompt, Inc. User-Agent: Thunderbird 1.5.0.5 (X11/20060728) MIME-Version: 1.0 To: Tom Lane CC: andy , Alvaro Herrera , pgsql-hackers@postgresql.org Subject: Re: [ADMIN] Vacuum error on database postgres References: <44F82150.5000809@pnlassociates.com> <4001.1157121669@sss.pgh.pa.us> <27602.1158238299@sss.pgh.pa.us> <45095CDD.8090704@squeakycode.net> <29469.1158247230@sss.pgh.pa.us> In-Reply-To: <29469.1158247230@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.88.3, clamav-milter version 0.88.3 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Thu, 14 Sep 2006 09:02:00 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.567 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, SPF_HELO_SOFTFAIL X-Spam-Level: ** X-Archive-Number: 200609/1121 X-Sequence-Number: 90650 > This behavior dates from a time when there was no good alternative. > One possible fix today would be to make ANALYZE take > ShareUpdateExclusive lock instead, thus ensuring there is only one > ANALYZE at a time on a table. However I'm a bit concerned by the > possibility that ANALYZE-inside-a-transaction could accumulate a > whole bunch of such locks in a random order, leading at least to > a risk of deadlocks against other ANALYZEs. (We have to hold the > lock till commit, else we aren't fixing the problem.) Do we need a > specialized lock type just for ANALYZE? Would sorting the target > list of rel OIDs be enough? Perhaps it's not worth worrying about? > Why not an internal lock that people don't see? The behavior would the following: conn1: analyze foo; conn2: analyze foo; ERROR: analyze already running on foo conn1: analyze foo; conn2: analyze; NOTICE: analyze full started, analyze running on foo, skipping foo Sincerely, Joshua D. Drake > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 1: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240 Providing the most comprehensive PostgreSQL solutions since 1997 http://www.commandprompt.com/