Re: Performance Improvement by reducing WAL for Update Operation

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
Cc: simon(at)2ndquadrant(dot)com, 'Alvaro Herrera' <alvherre(at)2ndquadrant(dot)com>, noah(at)leadboat(dot)com, horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Performance Improvement by reducing WAL for Update Operation
Date: 2013-01-28 21:23:09
Message-ID: 5106EC3D.7090500@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 28.01.2013 15:39, Amit Kapila wrote:
> Rebased the patch as per HEAD.

I don't like the way heap_delta_encode has intimate knowledge of how the
lz compression works. It feels like a violent punch through the
abstraction layers.

Ideally, you would just pass the old and new tuple to pglz as char *,
and pglz code would find the common parts. But I guess that's too slow,
as that's what I originally suggested and you rejected that approach.
But even if that's not possible on performance grounds, we don't need to
completely blow up the abstraction. pglz can still do the encoding - the
caller just needs to pass it the attribute boundaries to consider for
matches, so that it doesn't need to scan them byte by byte.

I came up with the attached patch. I wrote it to demonstrate the API,
I'm not 100% sure the result after decoding is correct.

- Heikki

Attachment Content-Type Size
wal_update_pglz_with_history-heikki.patch text/x-diff 29.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gurjeet Singh 2013-01-28 21:30:51 Re: [PERFORM] pgbench to the MAXINT
Previous Message Tom Lane 2013-01-28 21:08:25 Re: Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used