Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id DBCAB9FB6CB; Thu, 30 Aug 2007 13:42:01 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 06729-08; Thu, 30 Aug 2007 13:41:54 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id 249009FB359; Thu, 30 Aug 2007 13:41:53 -0300 (ADT) Received: from perhan.alvh.no-ip.org (201-220-104-109.bk9-dsl.surnet.cl [201.220.104.109]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l7UGfrVW004879; Thu, 30 Aug 2007 09:41:54 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id C197C47C5F; Thu, 30 Aug 2007 12:41:51 -0400 (CLT) Date: Thu, 30 Aug 2007 12:41:51 -0400 From: Alvaro Herrera To: Tom Lane Cc: dx k9 , pgsql-admin@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: reindexdb hangs Message-ID: <20070830164151.GS5872@alvh.no-ip.org> References: <22018.1178144703@sss.pgh.pa.us> <20070825222150.GU31461@alvh.no-ip.org> <4909.1188082313@sss.pgh.pa.us> <20070829222341.GX7911@alvh.no-ip.org> <12577.1188428726@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <12577.1188428726@sss.pgh.pa.us> User-Agent: Mutt/1.5.16 (2007-06-11) X-Virus-Scanned: ClamAV 0.91.1/4107/Wed Aug 29 09:16:42 2007 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, 30 Aug 2007 09:41:54 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/413 X-Sequence-Number: 26744 Tom Lane wrote: > Alvaro Herrera writes: > > Tom Lane wrote: > >> Yeah, an extra fetch of the pg_class row doesn't seem all that nice. > >> I think you'd want to check it in approximately the same two places > >> where pg_class_ownercheck() is applied (one for the 1-xact and one for > >> the multi-xact path). > > > Actually, the 1-xact path does not need it, because the check is already > > elsewhere. > > Yeah, but if you do it there it's one added comparison > (isOtherTempNamespace is very cheap, and you can get the namespace > cheaply from the already-open rel). This way you need an extra syscache > lookup because you are insisting on doing the check in a place where you > don't have easy access to the pg_class row. Doesn't seem better. I'm not sure I follow. Are you suggesting adding a new function, similar to pg_class_ownercheck, which additionally checks for temp-ness? -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.