Add a different archive_command example for Linux / Unix - Mailing list pgsql-docs

From PG Doc comments form
Subject Add a different archive_command example for Linux / Unix
Date
Msg-id 170738227967.3279716.16428042124969376330@wrigleys.postgresql.org
Whole thread Raw
Responses Re: Add a different archive_command example for Linux / Unix
List 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 by date:

Previous
From: PG Doc comments form
Date:
Subject: Pathetic pedantry
Next
From: Daniel Gustafsson
Date:
Subject: Re: Pathetic pedantry