Reduce amount of WAL generated by CREATE INDEX for gist, gin andsp-gist - Mailing list pgsql-hackers

From Anastasia Lubennikova
Subject Reduce amount of WAL generated by CREATE INDEX for gist, gin andsp-gist
Date
Msg-id a055f129-518e-3eac-1242-833d58edfddb@postgrespro.ru
Whole thread Raw
Responses Re: Reduce amount of WAL generated by CREATE INDEX for gist, gin andsp-gist  (David Steele <david@pgmasters.net>)
Re: Reduce amount of WAL generated by CREATE INDEX for gist, gin andsp-gist  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
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


Attachment

pgsql-hackers by date:

Previous
From: Antonin Houska
Date:
Subject: Re: [HACKERS] WIP: Aggregation push-down
Next
From: Robert Haas
Date:
Subject: Re: ON CONFLICT DO UPDATE for partitioned tables