Re: Question on postgresql.conf

From: Fabio Pardi <f(dot)pardi(at)portavita(dot)eu>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Question on postgresql.conf
Date: 2018-07-31 12:23:54
Message-ID: bc083641-05b1-5c26-c044-6b8d68a8548b@portavita.eu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

you can read this:

https://www.postgresql.org/docs/current/static/runtime-config-file-locations.html

Basically you will start Postgres as

pg_ctl -D /nfs/global/

but it expects to find a file postgresql.conf (i do not know any way to specify a different file name)

inside postgresql.conf you should then specify something like:

data_directory='/your/data/folder'

What probably better fits you is instead the following:

- use the original location of your data folder and postgresql.conf file

- specify inside the file:
include='/nfs/global/postgres-machine1.cnf'

I have doubts on the security implications of that setup, though.

regards,
fabio pardi

On 31/07/18 13:27, Lu, Dan wrote:
>
> 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(dot)g(dot)johnston(at)gmail(dot)com]
> *Sent:* Tuesday, July 31, 2018 1:48 AM
> *To:* Alvaro Aguayo Garcia-Rada <aaguayo(at)opensysperu(dot)com>
> *Cc:* pgsql-general(at)postgresql(dot)org; Lu, Dan <Dan(dot)Lu(at)msx(dot)bala(dot)susq(dot)com>
> *Subject:* Re: Question on postgresql.conf
>
>  
>
> On Monday, July 30, 2018, Alvaro Aguayo Garcia-Rada <aaguayo(at)opensysperu(dot)com <mailto:aaguayo(at)opensysperu(dot)com>> wrote:
>
> As far as I know, it's not currently possible. 
>
>  
>
> That would be incorrect, you just need to change server startup commands.
>
>  
>
> https://www.postgresql.org/docs/10/static/runtime-config-file-locations.html
>
>  
>
> 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lu, Dan 2018-07-31 12:26:24 RE: Question on postgresql.conf
Previous Message Lu, Dan 2018-07-31 11:27:36 RE: Question on postgresql.conf