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

Reply via email to