]> granicus.if.org Git - postgresql/commit
Rewrite the way GIN posting lists are packed on a page, to reduce WAL volume.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 31 Mar 2014 12:15:19 +0000 (15:15 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 31 Mar 2014 12:23:50 +0000 (15:23 +0300)
commit14d02f0bb352d70d50106e153aca4af9c4b0b842
tree695633a4ebbb4b50da88b43d5cb5a1283018b32f
parent0cfa34c25a7c8e7017cac346d954016fad0dfc16
Rewrite the way GIN posting lists are packed on a page, to reduce WAL volume.

Inserting (in retail) into the new 9.4 format GIN posting tree created much
larger WAL records than in 9.3. The previous strategy to WAL logging was
basically to log the whole page on each change, with the exception of
completely unmodified segments up to the first modified one. That was not
too bad when appending to the end of the page, as only the last segment had
to be WAL-logged, but per Fujii Masao's testing, even that produced 2x the
WAL volume that 9.3 did.

The new strategy is to keep track of changes to the posting lists in a more
fine-grained fashion, and also make the repacking" code smarter to avoid
decoding and re-encoding segments unnecessarily.
src/backend/access/gin/gindatapage.c
src/backend/access/gin/ginpostinglist.c
src/backend/access/gin/ginxlog.c
src/backend/access/rmgrdesc/gindesc.c
src/include/access/gin_private.h