Search Postgresql Archives

RE: Question on postgresql.conf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx]
Sent: Tuesday, July 31, 2018 9:52 AM
To: Lu, Dan <Dan.Lu@xxxxxxxxxxxxxxxxx>
Cc: David G. Johnston <david.g.johnston@xxxxxxxxx>; Alvaro Aguayo Garcia-Rada <aaguayo@xxxxxxxxxxxxxxx>; pgsql-general@xxxxxxxxxxxxxx
Subject: Re: Question on postgresql.conf

"Lu, Dan" <Dan.Lu@xxxxxxx> 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.





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux