pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Lu, Dan <Dan.Lu@sig.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Alvaro Aguayo Garcia-Rada <aaguayo@opensysperu.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: RE: Question on postgresql.conf
Date: Tue, 31 Jul 2018 13:59:43 +0000
Message-ID: <ffd0c58838c44259b7c83e86256c4677@msx.bala.susq.com> (raw)
In-Reply-To: <7209.1533045115@sss.pgh.pa.us>
References: <364bc889f8634b5a811a603a3ff725df@msx.bala.susq.com>
	<1725191888.48995.1533013367672.JavaMail.zimbra@adriana.opensysperu.com>
	<CAKFQuwZkPcc_Ld-OLN8+9GP0K+3rD9MYiV9__eLdTF7008YFHw@mail.gmail.com>
	<873ebcfde31c4aa5ad71bd2f8225a311@msx.bala.susq.com>
	<7209.1533045115@sss.pgh.pa.us>

Thanks for your reply.

I can start the database like this: pg_ctl start -D /hostname/postgres/data -l /hostname/postgres/log

My data directory has the following file:
postgres.cnf

Content of the postgres.cnf contains only 1 line:
include /nfs/global/postgres-<hostname>.cnf

Question:
Can <hostname> be a variable like `hostname` derived from Unix shell or I have to hardcode the name of the host like " include /nfs/global/postgres-host123.cnf

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Tuesday, July 31, 2018 9:52 AM
To: Lu, Dan <Dan.Lu@msx.bala.susq.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>; Alvaro Aguayo Garcia-Rada <aaguayo@opensysperu.com>; pgsql-general@postgresql.org
Subject: Re: Question on postgresql.conf

"Lu, Dan" <Dan.Lu@sig.com> writes:
> Say, I want to put the config file on a share drive so all my postgres configuration file can be seen in one location.
> /nfs/global/postgres-<hostname>.cnf

What I'd do is make each data directory's postgresql.conf contain just this:

include /nfs/global/postgres-<hostname>.cnf

and then just start the postmaster without any weird switches.
In this way you will avoid breaking PG-specific tools that expect to find the config file at its standard location.

regards, tom lane

________________________________

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.




view thread (18+ messages)  latest in thread

Message-ID: <ffd0c58838c44259b7c83e86256c4677@msx.bala.susq.com>
Permalink:  ../ffd0c58838c44259b7c83e86256c4677@msx.bala.susq.com/
Also on:    postgresql.org/message-id/ffd0c58838c44259b7c83e86256c4677@msx.bala.susq.com

 · 

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: Dan.Lu@sig.com, tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, aaguayo@opensysperu.com
  Subject: Re: Question on postgresql.conf
  In-Reply-To: <ffd0c58838c44259b7c83e86256c4677@msx.bala.susq.com>
  References: <364bc889f8634b5a811a603a3ff725df@msx.bala.susq.com> <1725191888.48995.1533013367672.JavaMail.zimbra@adriana.opensysperu.com> <CAKFQuwZkPcc_Ld-OLN8+9GP0K+3rD9MYiV9__eLdTF7008YFHw@mail.gmail.com> <873ebcfde31c4aa5ad71bd2f8225a311@msx.bala.susq.com> <7209.1533045115@sss.pgh.pa.us> <ffd0c58838c44259b7c83e86256c4677@msx.bala.susq.com>

* 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