From: "Martin Münstermann" <mmuenst@gmx.de>
To: pgsql-admin@postgresql.org
Subject: archive_command vs. cp -i
Date: Fri, 17 Jun 2011 10:40:57 +0200
Message-ID: <20110617084057.238070@gmx.net> (raw)
Hi,
while setting up a new linux postgresql server, I checked my archive_command.
I noticed that the usual "cp -i f1 f2 < /dev/null" did NOT as expected:
It did not overwrite the file (PASS), but it returned zero (FAIL, should return error).
This could be reproduced on CentOS 5.6, RHEL4, and Ubuntu 10.04.
This is my test:
echo huhu > file1
echo hello > file2
/bin/cp -i file2 file1 < /dev/null
echo $? # should return != 0
diff -s file1 file2
Am I missing something here?
Should the BACKUP-ARCHIVING-WAL doc be changed?
Regards,
Martin
--
NEU: FreePhone - kostenlos mobil telefonieren!
Jetzt informieren: http://www.gmx.net/de/go/freephone
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-admin@postgresql.org
Cc: mmuenst@gmx.de
Subject: Re: archive_command vs. cp -i
In-Reply-To: <20110617084057.238070@gmx.net>
* 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