pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gavan Schneider <list.pg.gavan@pendari.org>
To: Allie Crawford <CrawfordMA@ChurchofJesusChrist.org>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: archive_commnad parameter question
Date: Tue, 20 Apr 2021 07:16:56 +1000
Message-ID: <2CE08B0E-618F-42FE-8CB4-B4F160CF42B6@pendari.org> (raw)
In-Reply-To: <CY4PR04MB04704227BFE53F5C5E799748D9499@CY4PR04MB0470.namprd04.prod.outlook.com>
References: <CY4PR04MB04704227BFE53F5C5E799748D9499@CY4PR04MB0470.namprd04.prod.outlook.com>

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





view thread (5+ messages)  latest in thread

Message-ID: <2CE08B0E-618F-42FE-8CB4-B4F160CF42B6@pendari.org>
Permalink:  ../2CE08B0E-618F-42FE-8CB4-B4F160CF42B6@pendari.org/
Also on:    postgresql.org/message-id/2CE08B0E-618F-42FE-8CB4-B4F160CF42B6@pendari.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: list.pg.gavan@pendari.org, CrawfordMA@ChurchofJesusChrist.org
  Subject: Re: archive_commnad parameter question
  In-Reply-To: <2CE08B0E-618F-42FE-8CB4-B4F160CF42B6@pendari.org>
  References: <CY4PR04MB04704227BFE53F5C5E799748D9499@CY4PR04MB0470.namprd04.prod.outlook.com> <2CE08B0E-618F-42FE-8CB4-B4F160CF42B6@pendari.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox