Re: archive_commnad parameter question

From: Gavan Schneider <list(dot)pg(dot)gavan(at)pendari(dot)org>
To: Allie Crawford <CrawfordMA(at)ChurchofJesusChrist(dot)org>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: archive_commnad parameter question
Date: 2021-04-19 21:16:56
Message-ID: 2CE08B0E-618F-42FE-8CB4-B4F160CF42B6@pendari.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On 20 Apr 2021, at 7:09, Allie Crawford wrote:

> archive_command = 'test ! -f /mnt/server/archivedir/%f && cp %p
> /mnt/server/archivedir/%f' # Unix
>
> Does anybody know what is “test” representing in this parameter
> configuration?
>
my_unix_prompt> man test

gives:
Tests the expression given and sets the exit status to 0 if true,
and 1 if false. An expression is made up
of one or more operators and their arguments.

In other words “test” here is a unix command which evaluated the
expression supplied via the arguments.
Mostly used in its alternate form of “[ … ]” in shell scripts

Gavan Schneider
——
Gavan Schneider, Sodwalls, NSW, Australia
Explanations exist; they have existed for all time; there is always a
well-known solution to every human problem — neat, plausible, and
wrong.
— H. L. Mencken, 1920

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter J. Holzer 2021-04-19 21:18:45 Re: archive_commnad parameter question
Previous Message Adrian Klaver 2021-04-19 21:16:41 Re: archive_commnad parameter question

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter J. Holzer 2021-04-19 21:18:45 Re: archive_commnad parameter question
Previous Message Adrian Klaver 2021-04-19 21:16:41 Re: archive_commnad parameter question