Re: [WIP] Performance Improvement by reducing WAL for Update Operation - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: [WIP] Performance Improvement by reducing WAL for Update Operation
Date
Msg-id 5023B681.2020705@enterprisedb.com
Whole thread Raw
In response to [WIP] Performance Improvement by reducing WAL for Update Operation  (Amit kapila <amit.kapila@huawei.com>)
Responses Re: [WIP] Performance Improvement by reducing WAL for Update Operation
List pgsql-hackers
On 09.08.2012 15:56, Amit Kapila wrote:
> From: Heikki Linnakangas [mailto:heikki.linnakangas@enterprisedb.com]
> Sent: Thursday, August 09, 2012 4:59 PM
> On 09.08.2012 14:11, Simon Riggs wrote:
>
>>>> But then again, full-page writes cover that too. There
>>>> will be a full-page image of the old block in the WAL anyway.
>>
>>> Right, but we're planning to remove that, so its not a safe assumption
>>> to use when building new code.
>
>> I don't think we're going to get rid of full-page images any time soon.
>> I guess you could easily check if full-page writes are enabled, though,
>> and only do it for cross-page updates if it is.
>
> According to my understanding you are talking about corruption due to
> partial page writes which can be handled by full-page image of WAL. Correct
> me if I misunderstood.

I meant corruption caused by anything, like disk failure, bugs, cosmic 
rays, etc. The point is that currently the WAL record contains all the 
information required to reconstruct the old tuple. With a diff method, 
that's no longer the case, so if the old tuple gets corrupt for whatever 
reason, that error will be propagated to the new tuple.

It's not an issue as long as everything works correctly, but some 
redundancy is nice when you're trying to resurrect a corrupt database. 
That's what we're talking about here. That said, I don't think it's a 
big deal for this patch, at least not as long as full-page writes are 
enabled.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [PATCH] Make "psql -1 < file.sql" work as with "-f"
Next
From: Amit Kapila
Date:
Subject: Re: [WIP] Performance Improvement by reducing WAL for Update Operation