Skip site navigation (1) Skip section navigation (2)

Re: pitr replica dies on startup

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Frost <jeff(at)frostconsultingllc(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: pitr replica dies on startup
Date: 2007-09-01 01:45:10
Message-ID: 5802.1188611110@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
Jeff Frost <jeff(at)frostconsultingllc(dot)com> writes:
> Why does it request it twice?

I think the reason is that the rollforward cycle is

	fetch next segment into RECOVERYXLOG
	process segment
	unlink RECOVERYXLOG

and only when the "fetch" step fails does it realize it's done.  So then
it has to figure out which segment it wants to start extending and fetch
that into the real name of the segment.

We could probably rejigger this to avoid a duplicate fetch in common
cases, but I'm worried that we couldn't guarantee it in every case ---
edge cases like the last valid xlog record ending right at a segment
boundary might be trouble.  If the recovery script has to handle the
situation sometimes, it's probably best to make it do so on a regular
basis --- would you like to have only found out about this when you were
trying to revive your database at 4AM?

			regards, tom lane

In response to

Responses

pgsql-admin by date

Next:From: Jeff FrostDate: 2007-09-01 01:49:08
Subject: Re: pitr replica dies on startup
Previous:From: Jeff FrostDate: 2007-09-01 01:24:08
Subject: Re: pitr replica dies on startup

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group