Incomplete description of pg_start_backup?
От | Dmitry Koterov |
---|---|
Тема | Incomplete description of pg_start_backup? |
Дата | |
Msg-id | CA+CZih7ehLzhHkFivPfFHs0dvf+XdUpGXVMkrOLrcULiO4_mkw@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: Incomplete description of pg_start_backup?
|
Список | pgsql-hackers |
<div dir="ltr">I think that at <a href="http://www.postgresql.org/docs/current/static/functions-admin.html">http://www.postgresql.org/docs/current/static/functions-admin.html</a> and <a href="http://www.postgresql.org/docs/current/static/continuous-archiving.html">http://www.postgresql.org/docs/current/static/continuous-archiving.html</a> two importantpoints on how pg_start_backup() works are missing:<div style="style"><br /></div><div style="style">1. After pg_start_backup()and till pg_stop_backup() VACUUM is denied (e.g. autovacuum is turned off), so the new data is always appendedto data files, is never written at their middle. This allows to archive the data directory using any copying tools(rsync, tar, cp etc.). If you forget to call pg_stop_backup() by accident, data files will grow forever. So pg_start_backup()switches the database to "append-only mode" which is safe to backup without stopping (data files temporarilybecome append-only, WAL logs are append-only always).</div><div style="style"><br /></div><div style="style">2.After pg_start_backup() and till pg_stop_backup() full_page_writes is forced to be ON.</div><div style="style"><br/></div><div style="style">BTW are these points fully correct? If yes, it would be great to update the documentation,because in google there are a lot of questions on how exactly backup with pg_start_backup() works and why cp,tar etc. are safe after pg_start_backup(), but no clear answers. If no, could you please give a couple of comments onall these?</div></div>
В списке pgsql-hackers по дате отправления: