Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does PostgreSQL store configuration/conf files?

I have recently installed PostgreSQL on Ubuntu with the EnterpriseDB package. I can connect to the database locally, but I can't configure it because I can't find config files. I searched through entire hard drive and found only samples like pg_hba.conf.sample

Where are the PostgreSQL .conf files?

like image 595
Timur Sadykov Avatar asked Aug 30 '10 16:08

Timur Sadykov


People also ask

Where is Postgres config file in Windows?

Open the PostgreSQL configuration file. The file is named postgresql. conf. By default, on RHEL 7, the file is at /var/lib/pgsql/data/, and on Windows, the file is at C:\Program Files\PostgreSQL\ version_number \data\.

How do I view PostgreSQL conf?

To read what is stored in the postgresql. conf file itself, use the view pg_file_settings . If freshly written, this file will hold values that may not yet be in effect within the Postgres server. After writing, the settings must be loaded in one of various ways including a server restart.

What is PostgreSQL conf file in PostgreSQL?

conf is PostgreSQL's main configuration file and the primary source of configuration parameter settings. postgresql. conf is a plain text file generated by initdb and is normally stored in the data directory. However some distributions' packages may place postgresql.


2 Answers

Or ask your database:

$ psql -U postgres -c 'SHOW config_file' 

or, if logged in as the ubuntu user:

$ sudo -u postgres psql -c 'SHOW config_file' 
like image 182
Frank Heikens Avatar answered Sep 28 '22 04:09

Frank Heikens


Ubuntu 13.04 installed using software centre :

The location for mine is:

/etc/postgresql/9.1/main/postgresql.conf 
like image 29
Rui Lima Avatar answered Sep 28 '22 05:09

Rui Lima