Re: [WIP] Performance Improvement by reducing WAL for Update Operation

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [WIP] Performance Improvement by reducing WAL for Update Operation
Date: 2012-08-09 11:29:09
Message-ID: 50239F05.5090004@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 09.08.2012 14:11, Simon Riggs wrote:
> Given the marginal gain because of a low percentage of cross-block
> updates, I'm not keen. Low percentage because HOT tries hard to keep
> things on same block - even for non-HOT updates (which is the case,
> even though it sounds weird).

That depends entirely on the workload. If you do a bulk update that
updates every row on the table, most are going to be cross-block
updates, and the WAL size does matter.

>> 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.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-08-09 11:59:19 Re: [WIP] Performance Improvement by reducing WAL for Update Operation
Previous Message Amit Kapila 2012-08-09 11:17:15 Re: [WIP] Performance Improvement by reducing WAL for Update Operation