pgsql: Don't use "cp -i" in the example WAL archive_command. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Don't use "cp -i" in the example WAL archive_command.
Date
Msg-id E1QXiEk-000688-UO@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Don't use "cp -i" in the example WAL archive_command.

This is a dangerous example to provide because on machines with GNU cp,
it will silently do the wrong thing and risk archive corruption.  Worse,
during the 9.0 cycle somebody "improved" the discussion by removing the
warning that used to be there about that, and instead leaving the
impression that the command would work as desired on most Unixen.
It doesn't.  Try to rectify the damage by providing an example that is safe
most everywhere, and then noting that you can try cp -i if you want but
you'd better test that.

In back-patching this to all supported branches, I also added an example
command for Windows, which wasn't provided before 9.0.

Branch
------
REL8_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/334c608f2cb791c08af9f7507f77b4ca61369248

Modified Files
--------------
doc/src/sgml/backup.sgml |   25 ++++++++++++++-----------
1 files changed, 14 insertions(+), 11 deletions(-)


pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: pgsql: Set FLEXIBLE_ARRAY_MEMBER to empty for MSVC.
Next
From: Tom Lane
Date:
Subject: pgsql: Don't use "cp -i" in the example WAL archive_command.