Tom Lane wrote:
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.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