Re: Patch: Write Amplification Reduction Method (WARM)
Pavan Deolasee <pavan.deolasee@gmail.com>
From: Pavan Deolasee <pavan.deolasee@gmail.com>
To: Jaime Casanova <jaime.casanova@2ndquadrant.com>
Cc: Haribabu Kommi <kommi.haribabu@gmail.com>,
Tomas Vondra <tomas.vondra@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-01-03T17:45:47Z
Lists: pgsql-hackers
Attachments
- 0001_track_root_lp_v8.patch (application/octet-stream) patch v8
- 0002_warm_updates_v8.patch (application/octet-stream) patch v8
- 0003_warm_fixes_v6.patch (application/octet-stream) patch v6
- interesting-attrs-2.patch (application/octet-stream) patch
- (unnamed) (text/plain)
On Tue, Jan 3, 2017 at 9:43 AM, Pavan Deolasee <pavan.deolasee@gmail.com> wrote: > The patch still disables WARM on system tables, something I would like to > fix. But I've been delaying that because it will require changes at several > places since indexes on system tables are managed separately. > Here is another version which fixes a bug that I discovered while adding support for system tables. The patch set now also includes a patch to enable WARM on system tables. I'm attaching that as a separate patch because while the changes to support WARM on system tables are many, almost all of them are purely mechanical. We need to pass additional information to CatalogUpdateIndexes()/CatalogIndexInsert(). We need to tell these routines whether the update leading to them was a WARM update and which columns were modified so that it can correctly avoid adding new index tuples for indexes for which index keys haven't changed. I wish I could find another way of passing this information instead of making changes at so many places, but the only other way I could think of was tracking that information as part of the HeapTuple itself, which doesn't seem nice and may also require changes at many call sites where tuples are constructed. One minor improvement could be that instead of two, we could just pass "modified_attrs" and a NULL value may imply non-WARM update. Other suggestions are welcome though. I'm quite happy that all tests pass even after adding support for system tables. One reason for testing support for system tables was to ensure some more code paths get exercised. As before, I've included Alvaro's refactoring patch too. Thanks, Pavan -- Pavan Deolasee http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
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