Re: Patch: Write Amplification Reduction Method (WARM)
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Pavan Deolasee <pavan.deolasee@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>,
Robert Haas <robertmhaas@gmail.com>, Bruce Momjian <bruce@momjian.us>,
Jaime Casanova <jaime.casanova@2ndquadrant.com>, Haribabu Kommi <kommi.haribabu@gmail.com>,
Tomas Vondra <tomas.vondra@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-03-29T06:39:28Z
Lists: 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
Commits
-
Implement SortSupport for macaddr data type
- f90d23d0c518 10.0 cited
-
Simplify check of modified attributes in heap_update
- 2fd8685e7fd9 10.0 landed
-
Remove direct uses of ItemPointer.{ip_blkid,ip_posid}
- ce96ce60ca22 10.0 landed
-
Fix CatalogTupleInsert/Update abstraction for case of shared indstate.
- aedd554f84bb 10.0 landed
-
Provide CatalogTupleDelete() as a wrapper around simple_heap_delete().
- ab02896510e2 10.0 landed
-
Band-aid fix for incorrect use of view options as StdRdOptions.
- e3e66d8a9813 10.0 cited
-
Update visibility map in the second phase of vacuum.
- fdf9e21196a6 9.3.0 cited
-
Avoid having two copies of the HOT-chain search logic.
- 4da99ea4231e 9.2.0 cited
-
Postgres95 1.01 Distribution - Virgin Sources
- d31084e9d111 7.1.1 cited