Re: Re: [COMMITTERS] pgsql: Don't use "cp -i" in the example WAL archive_command.

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Thom Brown <thom(at)linux(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Don't use "cp -i" in the example WAL archive_command.
Date: 2011-06-20 01:51:17
Message-ID: BANLkTikh-a5ufD33QCBB06NR9zKPUZugcw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Sat, Jun 18, 2011 at 10:19 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Thom Brown <thom(at)linux(dot)com> writes:
>> On 18 June 2011 04:13, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>>> I tested on FreeBSD 7.4 and saw a 1 error return:
>
>> And on a Mac (so through Darwin 10.7.0 a BSD version too):
>
> Yeah, see yesterday's discussion on pgsql-admin.  I think the behavior
> with the error return may be a BSD-ism.  In any case, GNU cp does *not*
> do what we want, and that accounts for a sufficiently large fraction of
> machines in the field that I think it's just unsafe to suggest using
> "cp -i" so prominently.  There are too many people who'll just copy and
> paste the first example provided, especially if the warning to test it
> is buried several paragraphs later.

Anyway, you seem to have forgotten to fix the example of archive_command
in "24.3.5.1. Standalone Hot Backups".

archive_command = 'test ! -f /var/lib/pgsql/backup_in_progress ||
cp -i %p /var/lib/pgsql/archive/%f < /dev/null'

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Meskes 2011-06-20 11:58:26 pgsql: Fixed string in German translation that causes segfault.
Previous Message Peter Eisentraut 2011-06-19 20:45:21 Re: [COMMITTERS] pgsql: Make external_pid_file world readable

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2011-06-20 01:57:28 Re: time-delayed standbys
Previous Message Greg Stark 2011-06-20 01:39:12 Re: Patch - Debug builds without optimization