Re: Patch: Write Amplification Reduction Method (WARM)
Peter Geoghegan <pg@bowt.ie>
From: Peter Geoghegan <pg@bowt.ie>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Pavan Deolasee <pavan.deolasee@gmail.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-14T20:14:12Z
Lists: pgsql-hackers
On Tue, Mar 14, 2017 at 12:19 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote: > Impressive results. Agreed. It seems like an important invariant for WARM is that any duplicate index values ought to have different TIDs (actually, it's a bit stricter than that, since btrecheck() cares about simple binary equality). ISTM that it would be fairly easy to modify amcheck such that the "items in logical order" check, as well as the similar "cross-page order" check (the one that detects transposed pages) also check that this new WARM invariant holds. Obviously this would only make sense on the leaf level of the index. You wouldn't have to teach amcheck about the heap, because a TID that points to the heap can only be duplicated within a B-Tree index because of WARM. So, if we find that two adjacent tuples are equal, check if the TIDs are equal. If they are also equal, check for strict binary equality. If strict binary equality is indicated, throw an error due to invariant failing. IIUC, the design of WARM makes this simple enough to implement, and cheap enough that the additional runtime overhead is well worthwhile. You could just add this check to the existing checks without changing the user-visible interface. It seems pretty complementary to what is already there. -- Peter Geoghegan
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