Add a different archive_command example for Linux / Unix

Поиск
Список
Период
Сортировка
От PG Doc comments form
Тема Add a different archive_command example for Linux / Unix
Дата
Msg-id 170738227967.3279716.16428042124969376330@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: Add a different archive_command example for Linux / Unix  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-docs
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/bug-reporting.html
Description:

Hello,
in
https://www.postgresql.org/docs/16/continuous-archiving.html#BACKUP-ARCHIVING-WAL
the example given could be improved for Linux / Unix environment.

As cp command is buffered it means it could return success although the data
didn't reach the disk
which puts backups at risk.

I propose to use dd command with its fsync option.

So the actual equivalent example would be :

archive_command = 'dd if=%p of=/mnt/server/archivedir/%f bs=1M
conv=fsync,excl status=none' # Unix

What do you think ?

Regards
Gilles

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

Предыдущее
От: PG Doc comments form
Дата:
Сообщение: Pathetic pedantry
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Re: Pathetic pedantry