Re: Performance Improvement by reducing WAL for Update Operation

Heikki Linnakangas <hlinnakangas@vmware.com>

From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Amit Kapila <amit.kapila@huawei.com>
Cc: simon@2ndquadrant.com, 'Alvaro Herrera' <alvherre@2ndquadrant.com>, noah@leadboat.com, horiguchi.kyotaro@lab.ntt.co.jp, pgsql-hackers@postgresql.org
Date: 2013-01-28T21:23:09Z
Lists: pgsql-hackers

Attachments

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

Commits

  1. Flush stderr and stdout in isolation tester.