X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 6A5E99FADD1; Thu, 11 May 2006 19:58:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 00251-09; Thu, 11 May 2006 19:58:46 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 2692E9FB0D1; Thu, 11 May 2006 19:58:45 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id CCAB65643F; Thu, 11 May 2006 17:58:44 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Thu, 11 May 2006 17:58:42 -0500 Date: Thu, 11 May 2006 17:58:42 -0500 From: "Jim C. Nasby" To: Tom Lane Cc: Zeugswetter Andreas DCP SD , PFC , Greg Stark , pgsql-performance@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Big IN() clauses etc : feature proposal Message-ID: <20060511225842.GZ99570@pervasive.com> References: <20060511210141.GP99570@pervasive.com> <4335.1147385316@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4335.1147385316@sss.pgh.pa.us> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060511:tgl@sss.pgh.pa.us::8zJkqoIayCo3z5tY:00000000000000000000 0000000000000000000000006aRK X-Hashcash: 1:20:060511:zeugswettera@spardat.at::iVJBymNjXo7Es2Pm:00000000000000 0000000000000000000000002fpN X-Hashcash: 1:20:060511:lists@peufeu.com::wwTKqrbb0E9RUbhp:006Y7 X-Hashcash: 1:20:060511:gsstark@mit.edu::5P43lJPs1KTyNEpH:006F1O X-Hashcash: 1:20:060511:pgsql-performance@postgresql.org::64gPwWUlB5sFdMh8:00000 0000000000000000000000003Yzb X-Hashcash: 1:20:060511:pgsql-hackers@postgresql.org::LZxOryAVY4/dJo74:000000000 0000000000000000000000003leF X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/312 X-Sequence-Number: 19099 On Thu, May 11, 2006 at 06:08:36PM -0400, Tom Lane wrote: > "Jim C. Nasby" writes: > > I'd hope that wasn't what's happening... is the backend smart enough to > > know not to fsync anything involved with the temp table? > > The catalog entries required for it have to be fsync'd, unless you enjoy > putting your entire database at risk (a bad block in pg_class, say, > would probably take out more than one table). Yeah, thought about that after sending... :( > It's interesting to speculate about keeping such catalog entries in > child tables of pg_class etc that are themselves temp tables. Resolving > the apparent circularity of this is left as an exercise for the reader. Well, since it'd be a system table with a fixed OID there could presumably be a special case in the recovery code for it, though that's pretty fugly sounding. Another alternative would be to support global temp tables... I think that would handle all the complaints of the OP except for the cost of analyze. I suspect this would be easier to do than creating a special type of temp table that used tuplestore instead of the full table framework, and it'd certainly be more general-purpose. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461