Re: Skip hole in log_newpage

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Skip hole in log_newpage
Date: 2013-12-03 12:55:45
Message-ID: CA+TgmoZ1iKMH4ErvVCghLfAtWy8AKH2gafV9uVo3bqENXo-e4w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 3, 2013 at 6:03 AM, Heikki Linnakangas
<hlinnakangas(at)vmware(dot)com> wrote:
> 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?

Looks good to me.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-12-03 12:59:43 Re: UNNEST with multiple args, and TABLE with multiple funcs
Previous Message MauMau 2013-12-03 12:45:53 [bug fix] "pg_ctl stop" times out when it should respond quickly