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

From Simon Riggs
Subject Re: Performance Improvement by reducing WAL for Update Operation
Date
Msg-id CA+U5nMLna3CfqgEg=QvD-LO0Ct8BcxvdWMs1X7sVRPWwW+6MPg@mail.gmail.com
Whole thread Raw
In response to Re: Performance Improvement by reducing WAL for Update Operation  (Amit kapila <amit.kapila@huawei.com>)
Responses Re: Performance Improvement by reducing WAL for Update Operation
List pgsql-hackers
On 11 January 2013 17:08, Amit kapila <amit.kapila@huawei.com> wrote:

>> Just reviewing the patch now, making more sense with comments added.
>
>>In heap_delta_encode() do we store which columns have changed?
>
> Not the attribute bumberwise, but offsetwise it is stored.

(Does that mean "numberwise"??)

Can we identify which columns have changed? i.e. 1st, 3rd and 12th columns?


>> Do we store the whole new column value?
>
> Yes, please refer else part of code
>
> +               else
> +               {
> +                       data_len = new_tup_off - change_off;
> +                       if ((bp + (2 * data_len)) - bstart >= result_max)
> +                               return false;
> +
> +                       /* Copy the modified column data to the output buffer if present */
> +                       pglz_out_add(ctrlp, ctrlb, ctrl, bp, data_len, dp);
> +
>

"modified column data" could mean either 1) (modified column) data
i.e. the data for the modified column, or 2) modified (column data)
i.e. the modified data in the column. I read that as (2) and didn't
look at the code. ;-)

Happy now that I know its (1)

-- Simon Riggs                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Amit kapila
Date:
Subject: Re: Performance Improvement by reducing WAL for Update Operation
Next
From: Simon Riggs
Date:
Subject: Re: Performance Improvement by reducing WAL for Update Operation