public inbox for pgsql-novice@postgresql.org  
help / color / mirror / Atom feed
From: Greg Sabino Mullane <htamfids@gmail.com>
To: Subramanian,Ramachandran <ramachandran.subramanian@alte-leipziger.de>
Cc: pgsql-novice@lists.postgresql.org <pgsql-novice@lists.postgresql.org>
Subject: Re: 5 Instances in one box -- Postgresql.conf Archive Log command
Date: Mon, 9 Feb 2026 12:44:02 -0500
Message-ID: <CAKAnmm+AiZ9Nt7D6LmFnf1+bn33+igSc-xFcj2ZPiHoAt1EdeA@mail.gmail.com> (raw)
In-Reply-To: <76ab7592d45d47898d1a8e7bf0edd5ad@alte-leipziger.de>
References: <76ab7592d45d47898d1a8e7bf0edd5ad@alte-leipziger.de>

You cannot do that natively with Postgres. However, one solution would be
to make the archive_command into a separate file, that the main
postgresql.conf includes. Then you can keep copying the postgresql.conf but
keep the archive_command separate and unique. The syntax is

include = 'myserver.conf'

And then the myserver.conf would contain things specific to each server,
e.g.

archive_command = 'test ! -f /archives/INST3/%f && cp %p /archives/INST3/%f'
cluster_name = 'inst3'


Cheers,
Greg


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 using the --to and --cc options:
  reply via email

  To: pgsql-novice@postgresql.org
  Cc: htamfids@gmail.com, ramachandran.subramanian@alte-leipziger.de, pgsql-novice@lists.postgresql.org
  Subject: Re: 5 Instances in one box -- Postgresql.conf Archive Log command
  In-Reply-To: <CAKAnmm+AiZ9Nt7D6LmFnf1+bn33+igSc-xFcj2ZPiHoAt1EdeA@mail.gmail.com>

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

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