Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id BC9F11B5E5C4 for ; Tue, 15 Nov 2011 16:51:29 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 77117-06 for ; Tue, 15 Nov 2011 20:51:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 986B91B5E5B5 for ; Tue, 15 Nov 2011 16:51:21 -0400 (AST) Received: from smtp.01.com ([216.115.88.169]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RQPyM-0000iA-VE for pgsql-performance@postgresql.org; Tue, 15 Nov 2011 20:51:21 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-out-1.01.com (Postfix) with ESMTP id 5622C9D00B6 for ; Tue, 15 Nov 2011 14:51:02 -0600 (CST) X-Virus-Scanned: amavisd-new at smtp-out-1.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-1.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Azlojks4yvRM for ; Tue, 15 Nov 2011 14:51:02 -0600 (CST) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp-out-1.01.com (Postfix) with ESMTP id 2714E9D00B3 for ; Tue, 15 Nov 2011 14:51:02 -0600 (CST) Received: from Sidney-Stratton.local (70-36-143-92.dsl.dynamic.sonic.net [70.36.143.92]) by smtp-out-1.01.com (Postfix) with ESMTPSA id E82AB9D00B6 for ; Tue, 15 Nov 2011 14:51:01 -0600 (CST) Message-ID: <4EC2D0B5.6060901@agliodbs.com> Date: Tue, 15 Nov 2011 12:51:01 -0800 From: Josh Berkus Organization: PostgreSQL Experts Inc. User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.24) Gecko/20111103 Lightning/1.0b2 Thunderbird/3.1.16 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: unlogged tables References: <005501cca0ad$b9478440$2bd68cc0$@devshock.com> <20111111201822.GN24234@tamriel.snowman.net> <4EC0D827.8090601@archonet.com> <4EC0EAD6.9010302@archonet.com> <00ea01cca2ef$abcf3a30$036dae90$@devshock.com> <4EC0FAE80200002500042E6C@gw.wicourts.gov> <00ff01cca2f4$3cb86860$b6293920$@devshock.com> <4EC100810200002500042E7C@gw.wicourts.gov> In-Reply-To: <4EC100810200002500042E7C@gw.wicourts.gov> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.585 tagged_above=-10 required=5 tests=BAYES_00=-1.9, SARE_MILLIONSOF=0.315 X-Spam-Level: X-Archive-Number: 201111/183 X-Sequence-Number: 45694 >> Unlogged table can increase speed, this table has about 1.6 >> millions of update per hour, but unlogged with a chance of loss >> all information on a crash are not a good idea for this. > > pg_dump -t 'tablename' from a cron job? (Make sure to rotate dump > file names, maybe with day of week or some such.) Or just "CREATE TABLE AS" copy the table every hour to a second, backup table. Then it would be much easier to script automated restore of the data. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com