Re: Remove Deprecated Exclusive Backup Mode

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Remove Deprecated Exclusive Backup Mode
Дата
Msg-id 99d109f2e709750d7d877f497c78f3e98503c49f.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: Remove Deprecated Exclusive Backup Mode  (Fujii Masao <masao.fujii@gmail.com>)
Ответы Re: Remove Deprecated Exclusive Backup Mode  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
Fujii Masao wrote:
> Another idea is to improve an exclusive backup method so that it will never
> cause such issue. What about changing an exclusive backup mode of
> pg_start_backup() so that it creates something like backup_label.pending file
> instead of backup_label? Then if the database cluster has backup_label.pending
> file but not recovery.signal (this is the case where the database is recovered
> just after the server crashes while an exclusive backup is in progress),
> in this idea, the recovery using that database cluster always ignores
> (or removes) backup_label.pending file and start replaying WAL from
> the REDO location that pg_control file indicates. So this idea enables us to
> work around the issue that an exclusive backup could cause.

Then if you restore a backup, but forget to add the recovery.signal file,
PostgreSQL will happily recover from a wrong checkpoint and you end up with
a corrupted database.

I think the fundamental problem with all these approaches is that there is
no safe way to distinguish a server crashed in backup mode from a restored
backup.  This is what makes the problem so hard.

The existing exclusive backup is in my opinion the safest variant: it refuses
to create a corrupted cluster without manual intervention and gives you a dire
warning to consider if you are doing the right thing.

Yours,
Laurenz Albe



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

Предыдущее
От: "Nagaura, Ryohei"
Дата:
Сообщение: inted RE: Timeout parameters
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Unused parameters & co in code