Re: WAL Performance Improvements - Mailing list pgsql-patches

From Tom Lane
Subject Re: WAL Performance Improvements
Date
Msg-id 15817.1014615302@sss.pgh.pa.us
Whole thread Raw
In response to WAL Performance Improvements  (Janardhana Reddy <jana-reddy@mediaring.com.sg>)
List pgsql-patches
Janardhana Reddy <jana-reddy@mediaring.com.sg> writes:
>   I've attached a patch  which should improve the performance of WAL by
> reducing the fsync time
>  and write time by 50%(if OS page size is 4k) , if the transaction
> generate the WAL data  less then 4k. Instead of
>  writing every time  8k data in to the WAL file  it will write only the
> portion of the data which
>  as changed from the last time(Example : if transaction generates 150
> bytes of WAL data ,then it writes
>  only 150 bytes instead of 8k).

As near as I can tell, this breaks WAL by failing to ensure that the
rest of the current page is zeroed.  After crash and recovery, you might
read obsolete WAL records (written during the previous cycle of life
of the WAL segment file) and think they are valid.

I'd also be interested to see the measurements backing up the claim of 50%
performance improvement.  That'd depend very largely on the filesystem block
size, no?

            regards, tom lane

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: [HACKERS] Updated TODO item
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Updated TODO item