Re: [GENERAL] Slow PITR restore

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
Cc: "Simon Riggs" <simon(at)2ndquadrant(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, "Jeff Trout" <threshar(at)threshar(dot)is-a-geek(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] Slow PITR restore
Date: 2007-12-13 22:16:39
Message-ID: 87d4tansu0.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

"Heikki Linnakangas" <heikki(at)enterprisedb(dot)com> writes:

> It would be interesting to do something like that to speed up replay of long
> PITR archives, though. You could scan all (or at least far ahead) the WAL
> records, and make note of where there is full page writes for each page.
> Whenever there's a full page write further ahead in the log, you could ignore
> all changes to that page before that, because they're going to be overwritten
> anyway.

Hm, you could generate that data when you generate the logs. Keep a hash of
block number and when the last full page write was. Then whenever you switch
log files dump out that hash in a second file alongside.

PITR recovery could read that in before it starts reading any file and consult
it before applying any records.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's PostGIS support!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2007-12-13 22:17:24 Re: Better alternative for Primary Key then serial??
Previous Message Tom Lane 2007-12-13 22:10:44 Re: [GENERAL] Slow PITR restore

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2007-12-14 00:09:24 Re: [GENERAL] Slow PITR restore
Previous Message Tom Lane 2007-12-13 22:10:44 Re: [GENERAL] Slow PITR restore