pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: gparc@online.fr
Subject: Add a different archive_command example for Linux / Unix
Date: Thu, 08 Feb 2024 08:51:19 +0000
Message-ID: <170738227967.3279716.16428042124969376330@wrigleys.postgresql.org> (raw)

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


view thread (5+ messages)  latest in thread

Message-ID: <170738227967.3279716.16428042124969376330@wrigleys.postgresql.org>
Permalink:  ../170738227967.3279716.16428042124969376330@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/170738227967.3279716.16428042124969376330@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, gparc@online.fr
  Subject: Re: Add a different archive_command example for Linux / Unix
  In-Reply-To: <170738227967.3279716.16428042124969376330@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox