Re: [GENERAL] Slow PITR restore - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: [GENERAL] Slow PITR restore
Date
Msg-id 87d4tansu0.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: [GENERAL] Slow PITR restore  (Heikki Linnakangas <heikki@enterprisedb.com>)
List pgsql-hackers
"Heikki Linnakangas" <heikki@enterprisedb.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!


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] Slow PITR restore
Next
From: Josh Berkus
Date:
Subject: Re: [GENERAL] Slow PITR restore