Add a different archive_command example for Linux / Unix

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: gparc(at)online(dot)fr
Subject: Add a different archive_command example for Linux / Unix
Date: 2024-02-08 08:51:19
Message-ID: 170738227967.3279716.16428042124969376330@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Daniel Gustafsson 2024-02-08 10:26:43 Re: Pathetic pedantry
Previous Message PG Doc comments form 2024-02-07 21:33:28 Pathetic pedantry