Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 7650A9F9FCA; Mon, 10 Sep 2007 19:07:06 -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 40088-08; Mon, 10 Sep 2007 19:07:02 -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 A7FEA9F9EDC; Mon, 10 Sep 2007 19:07:02 -0300 (ADT) Received: from perhan.alvh.no-ip.org ([190.95.8.15]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l8AM72mr027570; Mon, 10 Sep 2007 15:07:03 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 2A18F47C64; Mon, 10 Sep 2007 18:07:00 -0400 (CLT) Date: Mon, 10 Sep 2007 18:07:00 -0400 From: Alvaro Herrera To: Tom Lane Cc: dx k9 , pgsql-admin@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: reindexdb hangs Message-ID: <20070910220700.GC3060@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> <20070830164151.GS5872@alvh.no-ip.org> <7460.1188500061@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7460.1188500061@sss.pgh.pa.us> User-Agent: Mutt/1.5.16 (2007-06-11) X-Virus-Scanned: ClamAV 0.91.1/4222/Sun Sep 9 18:15:15 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]); Mon, 10 Sep 2007 15:07:04 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/55 X-Sequence-Number: 26816 Tom Lane wrote: > Alvaro Herrera writes: > > I'm not sure I follow. Are you suggesting adding a new function, > > similar to pg_class_ownercheck, which additionally checks for temp-ness? > > No, I was just suggesting adding the check for temp-ness in cluster() > and cluster_rel() where we do pg_class_ownercheck. We already have the > rel open there and so it's cheap to do the temp-ness check. I applied a patch along these lines to HEAD and 8.2. I am unsure if I should backpatch to 8.1: the code in cluster.c has changed, and while it is relatively easy to modify the patch, this is a rare bug and nobody has reported it in CLUSTER (not many people clusters temp tables, it seems). Should I patch only REINDEX? How far back? -- Alvaro Herrera http://www.amazon.com/gp/registry/5ZYLFMCVHXC "The eagle never lost so much time, as when he submitted to learn of the crow." (William Blake)