Re: Hot Standby: Startup at shutdown checkpoint

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Hot Standby: Startup at shutdown checkpoint
Дата
Msg-id 4BBDB0FB.7030607@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Hot Standby: Startup at shutdown checkpoint  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Hot Standby: Startup at shutdown checkpoint
Список pgsql-hackers
Simon Riggs wrote:
> On Tue, 2010-04-06 at 10:22 +0100, Simon Riggs wrote:
> 
>> Initial patch. I will be testing over next day. No commit before at
>> least midday on Wed 7 Apr.
> 
> Various previous discussions sidelined a very important point: what
> exactly does it mean to "start recovery from a shutdown checkpoint"?

Hot standby should be possible as soon we know that the database is
consistent. That is, as soon as we've replayed WAL past the
minRecoveryPoint/backupStartPoint point indicated in pg_control.

> If standby_mode is enabled and there is no source of WAL, then we get a
> stream of messages saying
> 
> LOG:  record with zero length at 0/C000088
> ...
> 
> but most importantly we never get to the main recovery loop, so Hot
> Standby never gets to start at all. We can't keep retrying the request
> for WAL and at the same time enter the retry loop, executing lots of
> things that expect non-NULL pointers using a NULL xlog pointer.

You mean it can't find even the checkpoint record to start replaying? I
think the behavior in that scenario is fine as it is. The database isn't
consistent (or at least we can't know if it is, because we don't know
the redo pointer) until you read and replay the first checkpoint record.

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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Hot Standby: Startup at shutdown checkpoint
Следующее
От: Robert Haas
Дата:
Сообщение: Re: A maze of twisty mailing lists all the same