Sunday , December 22 2024

How To Stop, Start, Restart and Reload PostgreSQL Service

You can do PostgreSQL service management in two ways.

Generally, restart or reload is required when changes are made to the postgresql.conf file.

You can find information on the right side of the parameters in the postgresql.conf file that require restart or reload.

For example, you can see the line for max_connection parameter below.

max_connections = 4000                  # (change requires restart)

First Method:

You can do this using the systemctl command with the root user.

The PostgreSQL service name will depend on the version you are using.

If you are using version 9.6, the service name is “postgresql-9.6.service”

If you are using version 10.2, the service name will be “PostgreSQL-10.2.service”.

Second Method:

You can use the pg_ctl command while in the postgres user. I usually prefer the 1st method.

The pgsql-10 value in the following commands will change according to your version.

Loading

About dbtut

We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.

2 comments

  1. Thanks for sharing step by step process. Very well explained.

Leave a Reply

Your email address will not be published. Required fields are marked *