| From: | Bruce Momjian <bruce(at)momjian(dot)us> |
|---|---|
| To: | Bruce Momjian <bruce(at)momjian(dot)us> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(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-18 03:13:09 |
| Message-ID: | 201106180313.p5I3D9g08294@momjian.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers pgsql-hackers |
Bruce Momjian wrote:
>
> Wow, this is the first I am hearing GNU cp -i can return zero exit if it
> doesn't do the copy. I tested this on Ubuntu 10.04 using cp 7.4 and
> got:
>
> $ touch x y
> $ cp -i x y; echo $?
> cp: overwrite `y'? n
> 0
>
> I see the same on my anchent BSD/OS machine too:
>
> $ touch x y
> $ cp -i x y; echo $?
> overwrite y? n
> 0
>
> Were we expecting an error if the file already existed? Assuming that,
> we should assume the file will always exist so basically archiving will
> never progress. Is this what we want? I just wasn't aware we were
> expecting an already-existing this to be an error --- I thought we just
> didn't want to overwrite it.
I tested on FreeBSD 7.4 and saw a 1 error return:
$ touch x y
$ cp -i x y; echo $?
overwrite y? (y/n [n]) n
not overwritten
1
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thom Brown | 2011-06-18 08:05:10 | Re: Re: [COMMITTERS] pgsql: Don't use "cp -i" in the example WAL archive_command. |
| Previous Message | Bruce Momjian | 2011-06-17 23:32:34 | Re: [COMMITTERS] pgsql: Don't use "cp -i" in the example WAL archive_command. |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Joe Conway | 2011-06-18 03:25:54 | Re: possible connection leak in dblink? |
| Previous Message | Bruce Momjian | 2011-06-18 02:58:52 | Re: pg_upgrade using appname to lock out other users |