Re: [PATCHES] Full page writes improvement, code update - Mailing list pgsql-hackers

From Koichi Suzuki
Subject Re: [PATCHES] Full page writes improvement, code update
Date
Msg-id 46104A70.20005@oss.ntt.co.jp
Whole thread Raw
In response to Re: [PATCHES] Full page writes improvement, code update  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCHES] Full page writes improvement, code update again.
List pgsql-hackers
Tom Lane wrote:
> "Simon Riggs" <simon@2ndquadrant.com> 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

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Implicit casts to text
Next
From: "Phil Currier"
Date:
Subject: Re: Column storage positions