Re: Do results of pg_start_backup work without WAL segments createdduring backup?
От | Rui DeSousa |
---|---|
Тема | Re: Do results of pg_start_backup work without WAL segments createdduring backup? |
Дата | |
Msg-id | 1A4A685C-7840-464A-8EEB-704E6423240B@crazybean.net обсуждение исходный текст |
Ответ на | Re: Do results of pg_start_backup work without WAL segments created during backup? (Thorsten Schöning <tschoening@am-soft.de>) |
Список | pgsql-admin |
> On Jul 8, 2019, at 9:10 AM, Thorsten Schöning <tschoening@am-soft.de> wrote: > > Guten Tag David Steele, > am Montag, 8. Juli 2019 um 14:12 schrieben Sie: > >> 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. > > And because that's expected, Postgres can successfully restore from > that, e.g. having used checkpoints before: Thorsten, A checkpoint can not sync data that has already been backed up. Also, the files are being actively written too while theback is occurring thus the backup contains suspected pages. Postgres needs the WALs to resolve any issues that were created by the backup. Without the WALs you have a corrupted/suspectdatabase. It’s just like crash recovery; the database has to replay everything since the last checkpoint. However, with a backup…the checkpoint is pg_start_backup().
В списке pgsql-admin по дате отправления: