Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 9CE2C9FB5BA; Tue, 27 Mar 2007 18:11:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 33195-01; Tue, 27 Mar 2007 18:11:21 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail01.enterprisedb.com (mail01.enterprisedb.com [63.246.7.168]) by postgresql.org (Postfix) with ESMTP id 5FDCC9FB562; Tue, 27 Mar 2007 18:11:21 -0300 (ADT) thread-index: AcdwtH+8LetBb550SRmdK9Xf0XqJHg== Received: from [192.168.0.22] ([82.133.110.50]) by mail01.enterprisedb.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 27 Mar 2007 17:11:32 -0400 Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2826 Subject: Re: Full page writes improvement, code update From: "Simon Riggs" To: "Koichi Suzuki" Cc: , In-Reply-To: <460886E8.6040907@oss.ntt.co.jp> References: <460886E8.6040907@oss.ntt.co.jp> Content-Type: text/plain; charset="iso-8859-1" Date: Tue, 27 Mar 2007 22:07:49 +0100 Message-ID: <1175029670.4386.222.camel@silverbirch.site> MIME-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 27 Mar 2007 21:11:32.0765 (UTC) FILETIME=[7ED4D4D0:01C770B4] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/1597 X-Sequence-Number: 101081 On Tue, 2007-03-27 at 11:52 +0900, Koichi Suzuki wrote: > Here's an update of a code to improve full page writes as proposed in > > http://archives.postgresql.org/pgsql-hackers/2007-01/msg01491.php > and > http://archives.postgresql.org/pgsql-patches/2007-01/msg00607.php > > Update includes some modification for error handling in archiver and > restoration command. > > In the previous threads, I posted several evaluation and shown that we > can keep all the full page writes needed for full XLOG crash recovery, > while compressing archive log size considerably better than gzip, with > less CPU consumption. I've found no further objection for this proposal > but still would like to hear comments/opinions/advices. Koichi-san, Looks interesting. I like the small amount of code to do this. A few thoughts: - Not sure why we need "full_page_compress", why not just mark them always? That harms noone. (Did someone else ask for that? If so, keep it) - OTOH I'd like to see an explicit parameter set during recovery since you're asking the main recovery path to act differently in case a single bit is set/unset. If you are using that form of recovery, we should say so explicitly, to keep everybody else safe. - I'd rather mark just the nonremovable blocks. But no real difference - We definitely don't want an normal elog in a XLogInsert critical section, especially at DEBUG1 level - diff -c format is easier and the standard - pg_logarchive and pg_logrestore should be called by a name that reflects what they actually do. Possibly pg_compresslog and pg_decompresslog etc.. I've not reviewed those programs, but: - Not sure why we have to compress away page headers. Touch as little as you can has always been my thinking with recovery code. - I'm very uncomfortable with touching the LSN. Maybe I misunderstand? - Have you thought about how pg_standby would integrate with this option? Can you please? - I'll do some docs for this after Freeze, if you'd like. I have some other changes to make there, so I can do this at the same time. -- Simon Riggs EnterpriseDB http://www.enterprisedb.com