Re: archive_commnad parameter question - Mailing list pgsql-general

From Gavan Schneider
Subject Re: archive_commnad parameter question
Date
Msg-id 2CE08B0E-618F-42FE-8CB4-B4F160CF42B6@pendari.org
Whole thread Raw
In response to archive_commnad parameter question  (Allie Crawford <CrawfordMA@ChurchofJesusChrist.org>)
Responses Stream Replication not working
List pgsql-general
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



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: archive_commnad parameter question
Next
From: "Peter J. Holzer"
Date:
Subject: Re: archive_commnad parameter question