Re: archive_commnad parameter question

Поиск
Список
Период
Сортировка
От Alan Hodgson
Тема Re: archive_commnad parameter question
Дата
Msg-id 95d35a2605b2b0257043e4cf0ac6be6953aae10f.camel@lists.simkin.ca
обсуждение исходный текст
Ответ на archive_commnad parameter question  (Allie Crawford <CrawfordMA@ChurchofJesusChrist.org>)
Список pgsql-general
On Mon, 2021-04-19 at 21:09 +0000, Allie Crawford wrote:

Hello,

I am new in PostgreSQL and I am trying to understand what the “test” word is representing in the archive_command configuration that the PostgreSQL documentation is showing as the format on how to set up this parameter

 

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?


'test' in this case is an actual executable present on many Unix and Unix-like systems.

In this case it effectively gates the copy (cp) command so that it only runs if the target file does not already exist. 

В списке pgsql-general по дате отправления:

Предыдущее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: archive_commnad parameter question
Следующее
От: "Podrigal, Aron"
Дата:
Сообщение: Alter generated column expression