Re: Clean shutdown and warm standby

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Clean shutdown and warm standby
Date: 2009-04-28 15:22:18
Message-ID: 49F71F2A.9000107@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
>> Andreas Pflug wrote:
>>> So to get this down to a solution, it appears to be correct to execute
>>> the RequestXLogSwitch right before CreateCheckPoint?
>
>> Hmm, then the checkpoint record isn't archived. That might be
>> acceptable, though, since all data would be safe in the preceding WAL.
>
> Not at all, because the database would be very unhappy at restart
> if it can't find the checkpoint record pg_control is pointing to.

At a normal startup, the checkpoint record would be there as usual. And
an archive recovery starts at the location indicated by the backup label.

AFAICS calling RequestXLogSwitch() before CreateCheckPoint would be
equivalent to calling "pg_switch_xlog()" just before shutting down.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vacuum 2009-04-28 15:31:19 Re: idea: global temp tables
Previous Message Tom Lane 2009-04-28 15:18:08 Re: idea: global temp tables