From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Frost <jeff@frostconsultingllc.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: pitr replica dies on startup
Date: Fri, 31 Aug 2007 21:45:10 -0400
Message-ID: <5802.1188611110@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.64.0708311822070.11463@discord.home.frostconsultingllc.com>
References: <Pine.LNX.4.64.0708311523260.11463@discord.home.frostconsultingllc.com>
<3673.1188602373@sss.pgh.pa.us>
<Pine.LNX.4.64.0708311822070.11463@discord.home.frostconsultingllc.com>
Jeff Frost <jeff@frostconsultingllc.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, jeff@frostconsultingllc.com
Subject: Re: pitr replica dies on startup
In-Reply-To: <5802.1188611110@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox