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

From Joshua D. Drake
Subject Re: [GENERAL] Slow PITR restore
Date
Msg-id 20071213135458.69d1d963@commandprompt.com
Whole thread Raw
List pgsql-hackers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 13 Dec 2007 11:12:26 -0800
"Joshua D. Drake" <jd@commandprompt.com> wrote:


> > > Hmm --- I was testing a straight crash-recovery scenario, not
> > > restoring from archive.  Are you sure your restore_command script
> > > isn't responsible for a lot of the delay?
> > 
> > Now that's an interesting thought, I will review in the morning when
> > I have some more IQ points back.
> 
> As promised :)... I took a look at this today and I think I found a
> couple of things. It appears that once the logs are archived, the
> recovery command copies the archive file to a recovery location and
> then restores the file. 
> 
> If that is correct that could explain some of the latency I am seeing
> here. Even with the speed of these devices, it is still a 16 MB file.
> That could take 1-2 seconds to copy.
> 
> There is also the execution of pg_standby each time as the recovery
> command which although I haven't timed is going to add overhead.
> 
> Based on the logs I pasted we are showing a delay of 6, 14, 3, 13, 4
> and then another 6 seconds.
> 
> When are fsyncs called on the recovery process?
> 
> At these types of delays even speeding the process 2 seconds per log
> is going to be significant.
> 
> Sincerely,
> 
> Joshua D. Drake
> 

- -- 
The PostgreSQL Company: Since 1997, http://www.commandprompt.com/ 
Sales/Support: +1.503.667.4564   24x7/Emergency: +1.800.492.2240
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
SELECT 'Training', 'Consulting' FROM vendor WHERE name = 'CMD'


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHYaoyATb/zqfZUUQRAozEAJ94sm3gdhPB0dcHfBD4uIs6cKHB4ACeK8dj
Wh9Jw2N3Ac29ELPaPZJL/+w=
=7edj
-----END PGP SIGNATURE-----

pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: [GENERAL] Slow PITR restore
Next
From: Simon Riggs
Date:
Subject: Re: [GENERAL] Slow PITR restore