Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 536419FB98F; Thu, 12 Apr 2007 21:11:33 -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 98310-08; Thu, 12 Apr 2007 21:11:24 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from serv1.oss.ntt.co.jp (serv1.oss.ntt.co.jp [222.151.198.98]) by postgresql.org (Postfix) with ESMTP id 25ED49FB48C; Thu, 12 Apr 2007 21:11:29 -0300 (ADT) Received: from [172.17.1.90] (unknown [172.17.1.90]) by serv1.oss.ntt.co.jp (Postfix) with ESMTP id 0811E104001; Fri, 13 Apr 2007 09:11:27 +0900 (JST) Message-ID: <461ECA4E.9010101@oss.ntt.co.jp> Date: Fri, 13 Apr 2007 09:09:50 +0900 From: Koichi Suzuki User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Zeugswetter Andreas ADI SD CC: Hannu Krosing , "Joshua D. Drake" , Tom Lane , Simon Riggs , josh@agliodbs.com, pgsql-hackers@postgresql.org, pgsql-patches@postgresql.org Subject: Re: [HACKERS] Full page writes improvement, code update References: <460886E8.6040907@oss.ntt.co.jp> <4609CAC3.7060008@oss.ntt.co.jp> <1175072848.4386.323.camel@silverbirch.site> <200703291145.28574.josh@agliodbs.com> <1175200117.4386.616.camel@silverbirch.site> <460C611E.6090800@oss.ntt.co.jp> <27693.1176226131@sss.pgh.pa.us> <461C3557.6040201@oss.ntt.co.jp> <461C3732.20006@commandprompt.com> <1176269612.3962.11.camel@localhost.localdomain> <461D9090.60808@oss.ntt.co.jp> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/346 X-Sequence-Number: 1913 Hi, Sorry, inline reply. Zeugswetter Andreas ADI SD wrote: > > Yup, this is a good summary. > > You say you need to remove the optimization that avoids > the logging of a new tuple because the full page image exists. > I think we must already have the info in WAL which tuple inside the full > page image > is new (the one for which we avoided the WAL entry for). > > How about this: > Leave current WAL as it is and only add the not removeable flag to full > pages. > pg_compresslog then replaces the full page image with a record for the > one tuple that is changed. > I tend to think it is not worth the increased complexity only to save > bytes in the uncompressed WAL though. It is essentially what my patch proposes. My patch includes flag to full page writes which "can be" removed. > Another point about pg_decompresslog: > > Why do you need a pg_decompresslog ? Imho pg_compresslog should already > do the replacing of the > full_page with the dummy entry. Then pg_decompresslog could be a simple > gunzip, or whatever compression was used, > but no logic. Just removing full page writes does not work. If we shift the rest of the WAL, then LSN becomes inconsistent in compressed archive logs which pg_compresslog produces. For recovery, we have to restore LSN as the original WAL. Pg_decompresslog restores removed full page writes as a dumm records so that recovery redo functions won't be confused. Regards; > > Andreas > -- ------------- Koichi Suzuki