Re: Patch: Write Amplification Reduction Method (WARM) - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Patch: Write Amplification Reduction Method (WARM)
Date
Msg-id CAA4eK1J8OK6cWSeRL=DtDMAPvgyi_f9TgEZq0-BshYCj_bFjVA@mail.gmail.com
Whole thread Raw
In response to Re: Patch: Write Amplification Reduction Method (WARM)  (Pavan Deolasee <pavan.deolasee@gmail.com>)
List pgsql-hackers
On Tue, Mar 28, 2017 at 10:31 PM, Pavan Deolasee
<pavan.deolasee@gmail.com> wrote:
>
> On Tue, Mar 28, 2017 at 4:05 PM, Amit Kapila <amit.kapila16@gmail.com>
> wrote:
>>
>> As asked previously, can you explain me on what basis are you
>> considering it robust?  The comments on top of datumIsEqual() clearly
>> indicates the danger of using it for toasted values (Also, it will
>> probably not give the answer you want if either datum has been
>> "toasted".).
>
>
> Hmm. I don' see why the new code in recheck is unsafe. The index values
> themselves can't be toasted (IIUC), but they can be compressed.
> index_form_tuple() already untoasts any toasted heap attributes and
> compresses them if needed. So once we pass heap values via
> index_form_tuple() we should have exactly the same index values as they were
> inserted. Or am I missing something obvious here?
>

I don't think relying on datum comparison for compressed values from
heap and index is safe (even after you try to form index tuple from
heap value again during recheck) and I have mentioned one of the
hazards of doing so upthread.  Do you see any place else where we rely
on comparison of compressed values?

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Patch: Write Amplification Reduction Method (WARM)
Next
From: Amit Langote
Date:
Subject: Re: Partitioned tables and relfilenode