RE: Question on postgresql.conf - Mailing list pgsql-general

From Lu, Dan
Subject RE: Question on postgresql.conf
Date
Msg-id 2b3b1f84dbd64b4ea6203377643eec6e@msx.bala.susq.com
Whole thread Raw
In response to Question on postgresql.conf  ("Lu, Dan" <Dan.Lu@sig.com>)
List pgsql-general

Is this the correct syntax for starting Postgres using a separate config_file for each host?  We like to take advantage of the Unix variable “hostname” to source in the name of the file.

 

Machine1: (notice we are using the `hostname` unix variable)

pg_ctl start -D /hostname/postgres/data -l /hostname/postgres/log -o config_file="/nfs/global/postgres-`hostname`.cnf"

 

Machine2: (notice we are using the `hostname` unix variable)

pg_ctl start -D /hostname/postgres/data -l /hostname/postgres/log -o config_file="/nfs/global/postgres-`hostname`.cnf"

 

From: Lu, Dan
Sent: Tuesday, July 31, 2018 7:28 AM
To: 'David G. Johnston' <david.g.johnston@gmail.com>; Alvaro Aguayo Garcia-Rada <aaguayo@opensysperu.com>
Cc: pgsql-general@postgresql.org
Subject: RE: Question on postgresql.conf

 

Hi David,

 

Which command?  Can you give me an example?

 

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

 

Example:

/nfs/global/postgres-machine1.cnf

 

/nfs/global/postgres-machine2.cnf

 

/nfs/global/postgres-machine3.cnf

 

 

From: David G. Johnston [mailto:david.g.johnston@gmail.com]
Sent: Tuesday, July 31, 2018 1:48 AM
To: Alvaro Aguayo Garcia-Rada <aaguayo@opensysperu.com>
Cc: pgsql-general@postgresql.org; Lu, Dan <Dan.Lu@msx.bala.susq.com>
Subject: Re: Question on postgresql.conf

 

On Monday, July 30, 2018, Alvaro Aguayo Garcia-Rada <aaguayo@opensysperu.com> wrote:

As far as I know, it's not currently possible. 

 

That would be incorrect, you just need to change server startup commands.

 

 

David J.

 




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.

pgsql-general by date:

Previous
From: Fabio Pardi
Date:
Subject: Re: Question on postgresql.conf
Next
From: vardenis pavardenis
Date:
Subject: Re: Postgresql 10.4 installation issues on Ubuntu 14.05