Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id C023B9FBF2E for ; Wed, 18 Jul 2007 16:29:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 85939-01 for ; Wed, 18 Jul 2007 16:29:01 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from smtp.vodafone.nl (smtp-out.vizzavi.nl [195.232.199.126]) by postgresql.org (Postfix) with ESMTP id 709C99FBF25 for ; Wed, 18 Jul 2007 16:29:03 -0300 (ADT) Received: from conversion-daemon.vfnlw44s.vfnl.dc-ratingen.de by vfnlw44s.vfnl.dc-ratingen.de (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0JLE00D0132K2V00@vfnlw44s.vfnl.dc-ratingen.de> (original mail from postgres@microbizz.nl) for pgsql-performance@postgresql.org; Wed, 18 Jul 2007 21:29:02 +0200 (MEST) Received: from [212.56.242.41] by vfnlw44s.vfnl.dc-ratingen.de (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JLE00KJI3G0J6A0@vfnlw44s.vfnl.dc-ratingen.de> for pgsql-performance@postgresql.org; Wed, 18 Jul 2007 21:29:01 +0200 (MEST) Date: Wed, 18 Jul 2007 21:28:40 +0200 From: Adriaan van Os Subject: Re: insert vs select into performance In-reply-to: <20070718113141.GH12481@mathom.us> To: pgsql-performance@postgresql.org Message-id: <469E69E8.3080204@microbizz.nl> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: <469D1AD3.9030004@ifi.uio.no> <0D6011B2-D09F-45E8-A5D7-5F84ADD1DC2B@seespotcode.net> <5666.1184704280@sss.pgh.pa.us> <469D2D59.9030106@ifi.uio.no> <20070718113141.GH12481@mathom.us> User-Agent: Thunderbird 1.5.0.4 (Macintosh/20060516) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/230 X-Sequence-Number: 25914 Michael Stone wrote: > On Tue, Jul 17, 2007 at 10:58:01PM +0200, Thomas Finneid wrote: >> I am not sure I understand you correctly here, are you saying that >> SELECT INTO in 8.1 disables WAL logging and uses just a single fsync >> at the end? in that case it means that I could disable WAL as well and >> achieve the same performance, does it not? > > Yes. The difference is that the select into optimization just means that > if the system crashes the data you're inserting is invalid (and is > properly cleaned up), and disabling the WAL means that if the system > crashes everything is invalid (and can't be cleaned up). So, how does one (temporarily) disable WAL logging ? Or, for example, disable WAL logging for a temporary table ? Regards, Adriaan van Os