ZFS snapshots - to use pg_start_backup() and pg_stop_backup() or no?

Поиск
Список
Период
Сортировка
От Gregory Haase
Тема ZFS snapshots - to use pg_start_backup() and pg_stop_backup() or no?
Дата
Msg-id CAHA6QFTqtEo71puexX9GeYLy6WR7SNHz66LAzatRtkvPvdRGWQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: ZFS snapshots - to use pg_start_backup() and pg_stop_backup() or no?  (Steven Schlansker <steven@likeness.com>)
Список pgsql-general
I was trying to figure out how to get the following syntax to work:

echo "select pg_start_backup('zfs_snapshot'); \\! zfs snapshot zroot/zpgsql@test; \\ select pg_stop_backup();" | psql postgres

The above command successfully starts the backup and creates the snapshot but then fails to stop the backup. I've tried various combinations of \ and \\ here with different whitespace and I just can't seem to find a combination that works. I don't understand the proper use of \\ (described as the separator metacommand).

However, in my research, I noted that a bunch of people seem to just not even bother with pg_start_backup/pg_stop_backup and I guess aren't that worried about the crash recovery process if they need to perform a restore. I also find the omission of the start/stop backup functions from the File System Level Backup page: http://www.postgresql.org/docs/9.2/static/backup-file.html

Is the pg_start_backup() and pg_stop_backup() even necessary?

It would be nice to understand the proper syntax for the psql pipe, regardless whether or not it is even necessary in this case.

Thanks,

Greg Haase

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

Предыдущее
От: Alex Lai
Дата:
Сообщение: Risk of set system wise statement_timeout
Следующее
От: Steven Schlansker
Дата:
Сообщение: Re: ZFS snapshots - to use pg_start_backup() and pg_stop_backup() or no?