Re: The suppress_redundant_updates_trigger() works incorrectly

From: KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: The suppress_redundant_updates_trigger() works incorrectly
Date: 2008-11-06 02:44:32
Message-ID: 49125A10.2020206@ak.jp.nec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan wrote:
>
>
> KaiGai Kohei wrote:
>> *** 80,88 ****
>> HeapTupleHeaderGetNatts(oldheader)) &&
>> ((newheader->t_infomask & ~HEAP_XACT_MASK) ==
>> (oldheader->t_infomask & ~HEAP_XACT_MASK)) &&
>> ! memcmp(((char *)newheader) + offsetof(HeapTupleHeaderData,
>> t_bits),
>> ! ((char *)oldheader) + offsetof(HeapTupleHeaderData,
>> t_bits),
>> ! newtuple->t_len - offsetof(HeapTupleHeaderData,
>> t_bits)) == 0)
>> {
>> /* ... then suppress the update */
>> rettuple = NULL;
>> --- 86,94 ----
>> HeapTupleHeaderGetNatts(oldheader)) &&
>> ((newheader->t_infomask & ~HEAP_XACT_MASK) ==
>> (oldheader->t_infomask & ~HEAP_XACT_MASK)) &&
>> ! memcmp(((char *)newheader) + newheader->t_hoff,
>> ! ((char *)oldheader) + oldheader->t_hoff,
>> ! newtuple->t_len - newheader->t_hoff) == 0)
>> {
>> /* ... then suppress the update */
>> rettuple = NULL;
>>
>
> Wouldn't this omit comparing the null bitmap?

Oops, I added the comparison of null bitmap here.

Thanks,
--
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>

Attachment Content-Type Size
suppress_redundant_updates_trigger.kaigai.2.patch text/x-patch 2.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua Tolley 2008-11-06 03:11:19 Re: Proposed Patch to Improve Performance of Multi-Batch Hash Join for Skewed Data Sets
Previous Message Andrew Dunstan 2008-11-06 02:17:54 Re: plperl needs upgrade for Fedora 10