Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id EC0A7B5DBE9 for ; Fri, 17 Jun 2011 05:47:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 99192-01-3 for ; Fri, 17 Jun 2011 08:47:40 +0000 (UTC) X-Greylist: delayed 00:06:39.517665 by SQLgrey-1.7.6 Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by mail.postgresql.org (Postfix) with SMTP id F335EB5DBC0 for ; Fri, 17 Jun 2011 05:47:39 -0300 (ADT) Received: (qmail 32160 invoked by uid 0); 17 Jun 2011 08:40:58 -0000 Received: from 193.194.157.126 by www030.gmx.net with HTTP; Fri, 17 Jun 2011 10:40:57 +0200 (CEST) Content-Type: text/plain; charset="utf-8" Date: Fri, 17 Jun 2011 10:40:57 +0200 From: =?iso-8859-1?Q?=22Martin_M=FCnstermann=22?= Message-ID: <20110617084057.238070@gmx.net> MIME-Version: 1.0 Subject: archive_command vs. cp -i To: pgsql-admin@postgresql.org X-Authenticated: #740997 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 X-Provags-ID: V01U2FsdGVkX1/EluQgjATE/oPt3EkfKDMcXYli7dY0u8CSxVkcCA A1H5/BTTkV6dj33AYSBZl7HPgNO90yoa/PFg== Content-Transfer-Encoding: 8bit X-GMX-UID: KyrDeMMvbmwoTfc8YzdLnadPUzc4cpFP X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.889 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201106/103 X-Sequence-Number: 37729 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