Hi,
I want to propose a bunch of patches which allow to reduce WAL traffic
generated by CREATE INDEX for GiST, GIN and SP-GiST. Similarly to b-tree
and RUM, we can now log index pages of other access methods only once
in the end of indexbuild process. Implementation is based on generic_xlog.
Not only it decreases the amount of WAL generated, but also completely
eliminates WAL overhead in case of error during index build.
I also attached sql scripts which I used to measure xlog size.
They show that pg_wal_lsn_diff for patched version is from 3 to 5 times
smaller.
Not sure if regression tests are needed, since it is just an optimization.
But I do not mind to add them if someone feels that it is necessary.
--
Anastasia Lubennikova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company