Re: somewhat wrong archive_command example

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Josh Kupershmidt <schmiddy(at)gmail(dot)com>, Greg Smith <greg(at)2ndquadrant(dot)com>, Euler Taveira de Oliveira <euler(at)timbira(dot)com>, pgsql-docs(at)postgresql(dot)org
Subject: Re: somewhat wrong archive_command example
Date: 2012-08-27 13:46:41
Message-ID: 20120827134641.GD11088@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Sun, Aug 26, 2012 at 11:43:45PM -0400, Peter Eisentraut wrote:
> I'm a little bit worried about this whole discussion. We have half a
> dozen supposed experts working on a 10-line shell script to do WAL
> archiving, and there is still
>
> - disagreement
> - uncertainty
> - bugs
>
> How is a normal user supposed to do this?
>
> That aside, I disagree with the premise for this script. It doesn't do
> anything more than the typical inline examples we give. The additional
> error reporting could be considered useful, but cp is perfectly capable
> of reporting these errors itself, and getting in the way of that just
> loses information and introduces race conditions. But if we are going
> to provide a separate shell script, we should at least offer some
> additional value, such as addressing the partial copy problem. But I
> think that's not very easy to do in portable shell.

I thought the idea was just to show what a shell script might look like
--- we could say it does the same as a single-line copy, but then people
could improve it, or we could add a comment to show how people could
improve it.

I am actually unclear how the partial copy problem would not be fixed by
just using cp without -i < /dev/null.

> I think what we should do is write a wrapper program in C that covers
> all the bases, support all platforms, and supports a handful of the most
> commonly used copy methods (cp, scp, etc. + compression). Then everyone
> can just use that and doesn't have to figure all these things out from
> scratch every time.

I doubt it would work because people like the flexibility of shell
scripts.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2012-08-29 22:38:47 Re: Observation on integer types documentation
Previous Message Peter Eisentraut 2012-08-27 03:43:45 Re: somewhat wrong archive_command example