Skip hole in log_newpage

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Skip hole in log_newpage
Date: 2013-12-03 11:03:41
Message-ID: 529DBA8D.3050405@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The log_newpage function, used to WAL-log a full copy of a page, is
missing the trick we normally use for full-page images to leave out the
unused space on the block. That's pretty trivial to implement, so we should.

The place where this matters the most is when building a new B-tree
index. When wal_level > minimal, all pages in the created index are
logged with log_newpage, and by default we leave 10% free space on index
pages. So implementing this reduces the amount of WAL generated by index
creation by roughly 10%.

Anyone see a problem with this?

- Heikki

Attachment Content-Type Size
log_newpage_hole-1.patch text/x-diff 15.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-12-03 11:37:22 Re: Skip hole in log_newpage
Previous Message Andres Freund 2013-12-03 10:56:07 Re: pgsql: Fix a couple of bugs in MultiXactId freezing