Re: Do results of pg_start_backup work without WAL segments createdduring backup?

Поиск
Список
Период
Сортировка
От David Steele
Тема Re: Do results of pg_start_backup work without WAL segments createdduring backup?
Дата
Msg-id e3e7d102-5d9c-fea3-cfd4-e25c296fcd1a@pgmasters.net
обсуждение исходный текст
Ответ на Re: Do results of pg_start_backup work without WAL segments created during backup?  (Thorsten Schöning <tschoening@am-soft.de>)
Ответы Re: Do results of pg_start_backup work without WAL segments created during backup?  (Thorsten Schöning <tschoening@am-soft.de>)
Список pgsql-admin
On 7/8/19 6:56 AM, Thorsten Schöning wrote:
> 
> If the full backup works at all... :-) And if it doesn't, I would like
> to know what I don't understand yet.

It doesn't.

pg_start_backup() does a checkpoint, but then the database continues
writing as you copy the files in whatever order you choose.  You may
copy a file that has a partial write or copy some files involved in a
transaction before it happens and others afterwards -- in fact this is
normal and expected.

The checkpoint constrains the range of WAL that you need, but that WAL
is absolutely needed to reconstruct the changes that happened during the
backup.

pg_basebackup is a better alternative than rolling your own and there
are third-party solutions that offer more functionality.

Above all be sure to test your backups.  If you test the backups you are
currently taking you will quickly find that they do not work, i.e. they
will not recover to consistency.

Regards,
-- 
-David
david@pgmasters.net



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

Предыдущее
От: Thorsten Schöning
Дата:
Сообщение: Re: Do results of pg_start_backup work without WAL segments created during backup?
Следующее
От: Thorsten Schöning
Дата:
Сообщение: Re: Do results of pg_start_backup work without WAL segments created during backup?