Re: Point in Time Recovery

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Point in Time Recovery
Дата
Msg-id 18739.1089753596@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Point in Time Recovery  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: Point in Time Recovery
Список pgsql-hackers
Simon Riggs <simon@2ndquadrant.com> writes:
> I'm getting carried away with the improbable....but this is the rather
> strange, but possible scenario I foresee:

> A sequence of times...
> 1. We start archiving xlogs
> 2. We take a checkpoint
> 3. we commit an important transaction
> 4. We take a backup
> 5. We take a checkpoint

> When we specify a recovery target, it is possible to specify the
> rollforward to complete just before point 3.

No, it isn't possible.  The recovery *must* proceed at least as far as
wherever the end of the log was at the time the backup was completed.
Otherwise everything is broken, not only clog, because you may have disk
blocks in your backup that postdate where you stopped log replay.

To have a consistent recovery at all, you must replay the log starting
from a checkpoint before the backup began and extending to the time that
the backup finished.  You only get to decide where to stop after that
point.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Release planning (was: Re: Status report)
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Re: Is "trust" really a good default?