PostgreSQL is a database management system that is bare when it is first installed. Therefore, you should make some configurations according to your system resorce. To do this, you will need to make the necessary configurations from postgresql.conf. Otherwise, there will be problems under heavy load.
There are some tools that configure the postgresql.conf file and the system based on the parameters you have specified. But instead of these tools, I recommend you to set the necessary parameters by following your system. But if you have installed postgresql for the first time and you don’t want to leave it in standard configurations, you can use the pg_tune tool.
PgTune shows the recommended configuration according to the parameters you specify.
You can use the link below to download the files related to Pg_tune.
After downloading the files specified in the link, we go to the downloaded directory and run pgtune with the help of the following commands.
When running pgtune, we need to enter the postgresql.conf path as follows.
By running the following command, we can see different uses.
You can see the recommended configurations by specifying the number of connections as follows.
./pgtune -i /var/lib/postgresql/10/data/postgresql.conf -c 1000
If this is difficult for you, go to the link below and write the parameters you want. Then, you can use the generated configuration.