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:
- Create your own configuration file.
- 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
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.
Uncomment the include_if_exists parameter and replace the three dots with the name of our config file db_config.conf.
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.