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: Peter Geoghegan <pg@bowt.ie>, Alvaro Herrera <alvherre@2ndquadrant.com>, Bruce Momjian <bruce@momjian.us>, Haribabu Kommi <kommi.haribabu@gmail.com>, Jaime Casanova <jaime.casanova@2ndquadrant.com>,
Robert Haas <robertmhaas@gmail.com>, Tomas Vondra <tomas.vondra@2ndquadrant.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-03-26T03:29:00Z
Lists: pgsql-hackers
On Sat, Mar 25, 2017 at 11:24 PM, Pavan Deolasee <pavan.deolasee@gmail.com> wrote: > > On Sat, 25 Mar 2017 at 11:03 PM, Peter Geoghegan <pg@bowt.ie> wrote: >> >> On Sat, Mar 25, 2017 at 12:54 AM, Amit Kapila <amit.kapila16@gmail.com> >> wrote: >> > I am not sure how do you want to binary compare two datums, if you are >> > thinking datumIsEqual(), that won't work. I think you need to use >> > datatype specific compare function something like what we do in >> > _bt_compare(). >> >> How will that interact with types like numeric, that have display >> scale or similar? >> > I wonder why Amit thinks that datumIsEqual won't work once we convert the > heap values to index tuple and then fetch using index_get_attr. After all > that's how the current index tuple was constructed when it was inserted. I think for toasted values you need to detoast before comparison and it seems datamIsEqual won't do that job. Am I missing something which makes you think that datumIsEqual will work in this context. > In > fact, we must not rely on _bt_compare because that might return "false > positive" even for two different heap binary values (I think). I am not telling to rely on _bt_compare, what I was trying to hint at it was that I think we might need to use some column type specific information for comparison. I am not sure at this stage what is the best way to deal with this problem without incurring non trivial cost. -- 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