PostgreSQL add config file - include_if_exists

PostgreSQL add config file - include_if_exists

Colleagues hello to all.

In today's article, we'll talk about how you can extend the main postgresql.conf configuration file in PostgreSQL. The  postgresql.conf file contains a lot of parameters and comments on these parameters, and therefore it makes sense to expand this file for the convenience of setting up the database.

Article content:

  1. Create your own configuration file.
  2. Add our file to postgresql.conf.

 

1. Create your own configuration file.

Create the configuration file in the same directory where you have all the database files. I will create a file called db_config.conf.

$. vim /app/postgresql/pgdatabase/data/db_config.conf

postgresql_config_file


 

2. Adding our file to postgresql.conf.

In order for our database to understand that the db_config.conf file is our configuration file, we need to add it to the main postgresql.conf configuration file. Open this file, find the parameter include_if_exists.

postgresql_config_file

Uncomment the  include_if_exists parameter and replace the three dots with the name of our config file db_config.conf.

postgresql_config_file

You can specify both a relative path to the file and an absolute path.

Be sure to restart the database afterwards.


 

Thank you all, I hope that my article helped you in some way.

SIMILAR ARTICLES

PostgreSQL - How to determine which files on disk correspond to tables in a database
PostgreSQL - How to determine which files on disk correspond to tables in a database
POSTGRESQL
Read more
PostgreSQL - How to find out the size of tables in a database
PostgreSQL - How to find out the size of tables in a database
POSTGRESQL
Read more
PostgreSQL - How to check user privileges
PostgreSQL - How to check user privileges
POSTGRESQL
Read more