Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 7695A9FB201; Sun, 1 Apr 2007 21:12:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 89533-07; Sun, 1 Apr 2007 21:12:00 -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 (ns.oss.ntt.co.jp [222.151.198.98]) by postgresql.org (Postfix) with ESMTP id 8701B9FB1C3; Sun, 1 Apr 2007 21:12:05 -0300 (ADT) Received: from [172.17.1.90] (unknown [172.17.1.90]) by serv1.oss.ntt.co.jp (Postfix) with ESMTP id D10CE104001; Mon, 2 Apr 2007 09:12:02 +0900 (JST) Message-ID: <46104A70.20005@oss.ntt.co.jp> Date: Mon, 02 Apr 2007 09:12:32 +0900 From: Koichi Suzuki User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Tom Lane CC: Simon Riggs , Richard Huxton , Zeugswetter Andreas ADI SD , 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> <1175249717.4386.716.camel@silverbirch.site> <460CE5FE.5050906@archonet.com> <1175253689.4386.749.camel@silverbirch.site> <23264.1175286950@sss.pgh.pa.us> In-Reply-To: <23264.1175286950@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/18 X-Sequence-Number: 1585 Tom Lane wrote: > "Simon Riggs" writes: >> Any page written during a backup has a backup block that would not be >> removable by Koichi's tool, so yes, you'd still be safe. > > How does it know not to do that? > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings > XLogInsert( ) already has a logic to determine if inserting WAL record is between pg_start_backup and pg_stop_backup. Currently it is used to remove full_page_writes when full_page_writes=off. We can use this to mark WAL records. We have one bit not used in WAL record header, the last bit of xl_info, where upper four bits are used to indicate the resource manager and three of the rest are used to indicate number of full page writes included in the record. In my proposal, this unused bit is used to mark that full page writes must not be removed at offline optimization by pg_compresslog. Regards; -- ------ Koichi Suzuki -- Koichi Suzuki