RE: Question on postgresql.conf

Поиск
Список
Период
Сортировка
От Alvaro Aguayo Garcia-Rada
Тема RE: Question on postgresql.conf
Дата
Msg-id 1725191888.48995.1533013367672.JavaMail.zimbra@adriana.opensysperu.com
обсуждение исходный текст
Ответ на Question on postgresql.conf  ("Lu, Dan" <Dan.Lu@sig.com>)
Ответы Re: Question on postgresql.conf
Re: Question on postgresql.conf
Список pgsql-general
Hi.

As far as I know, it's not currently possible. Maybe recompiling, but that could not be the best for production environment. I suppose this is this way becuase postgres is designed to expect a certain folder structure for it's data folder, and configuration files are considered part of it.

As you may see on the documentation:

https://www.postgresql.org/docs/9.6/static/app-postgres.html

You can change the data folder (-D command line option), but, no matter what the data folder is, it MUST have a postgresql.conf, as well as pg_hba.conf

However, some distros have made a similar appriach to what you may be looking to do. Don't remmeber which one, but there's a distro which it's stabdard postgresql server packages store configuration files at /etc/postgresql, while storing data at /var/lib/postgresql. This is done by simoly making a symlink, like "ln -s /mnt/shared/postgres/server1.conf /var/lib/postgres/data/postgresql.conf". Same applies to other conficuration files.

Also, if I'm not wrong, you can set custom permissions on configuration files(ONLY configuration files, the rest of the data folder must preserve postgres standard permissions). Just make sure the postgres user(or the user you will be using to run postgres) can read the configuration files.

Regards,

Alvaro Aguayo
Jefe de Operaciones
Open Comb Systems E.I.R.L.

Oficina: (+51-13377813 | Cel.: (+51) 995540103 | RPC: (+51) 954183248
Website: www.ocs.pe

Sent from my Sony Xperia™ smartphone

---- Lu, Dan wrote ----


Hello PostgreSQL Support Admin,

 

My name is Dan Lu.  I am fairly new to PostgreSQL.  I have experience working with Oracle/MySQL database.

 

I am going through the PostgreSQL manual and came across a question hoping you can help me.  It appears the "postgresql.conf" file is needed by default to start Postgres.  Since we have standard with other RDBMS to store the configuration file on a shared location for easy comparison, I would like to use a different name for this file like <hostname>.conf. 

 

Is this supported?  I remember coming across a writing that this is possible only when we are in a postgres prompt like.  Would you be able to help me out and can give me an example of how this can be done?

 

Thanks.


Dan




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 по дате отправления:

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Restore relhaspkey in PostgreSQL Version 11 Beta
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Question on postgresql.conf