To reload the configuration files, we send the SIGHUP signal to the postmaster, which then passes that on to all connected backends. That's why some people call reloading the server "sigh-up-ing".

As reloading the configuration file is achieved by sending the SIGHUP signal, we can reload the configuration file just for a single backend using the kill command.

First, find out the pid of the backend using pg_stat_activity. Then, from the OS prompt, issue the following:

kill  -SIGHUP pid

I dont understand bold words. Because we have many PIDs for backend and if we kill a PID, how can it get changes from reload configuration file (postgresql.conf)?


2 Answers 2


Probably this will help:

The Linux operating system normally terminates, or kills, a task by sending it a SIGHUP command. This stands for "Signal Hangup" and terminates a process on the system. If a programmer has not created a program restart command, or if you are having difficulties with an unresponsive program and wish to restart it, sending it a SIGHUP command will terminate the program and cause it to automatically restart.

  • Thanks . Ah . We use this command to restart (or terminate) the process .
    – Luan Huynh
    Commented Aug 1, 2013 at 1:41

What that is referring to is not the pid of your session, it is the pid of the parent postmaster process. A "backend" is the cluster as a whole (which the "postmaster" process is part of). Depending on how you installed Postgres, you have several options to HUP the process and reload the conf files, which include:

pg_ctl -D $PGDATA reload is a common method,

or from within the database (as the superuser): select pg_reload_conf();

  • thanks. We have many: parameters in postgresql.conf file, databases in PG instance, users in server. In 1 PG instance, each of db , how can we have separate configuration file (for each of db) ? If not, about users, each of them , example: param maintenance_work_mem , with user A -> maintenance_work_mem = 100 & user B -> maintenance_work_mem = 999 , it can set ?
    – Luan Huynh
    Commented Aug 1, 2013 at 1:40
  • 1
    postgresql.conf and pg_hba.conf are for the entire cluster. A cluster comprises many databases, so you can't set database-specific settings in the postgresql.conf file. You can set role-specific settings (aka "users"), session-specific etc. See the docs at postgresql.org/docs/current/static/sql-alterrole.html for role-based changes. For example: alter role userA set maintenance_work_mem to '100MB';
    – bma
    Commented Aug 1, 2013 at 2:37
  • As my understand, if the user A close connection & reconnect -> this configuration will change ?
    – Luan Huynh
    Commented Aug 1, 2013 at 9:01
  • @LuanHuynh Which configuration? The per-role setting? No, that takes effect for everything User A does. An example of how that is can be used: You have an OLTP type database, but one nightly reporting process needs to generate large summary reports. The general work_mem setting could be "10MB", but for this specific role (or session), you can bump that up to 1GB because you know it is going to be doing lots of sorts and aggregation steps. (as an example).
    – bma
    Commented Aug 1, 2013 at 13:49
  • Thanks for your answer. It's mean: default "work_mem = 10MB" (and every user when connecting have 10MB); when the user A connect to database (user A has a session), we can set up "work_mem = 100MB" for this only user, and when user A disconnect (session will end) and reconnect this "work_mem" will return default "10MB" ?
    – Luan Huynh
    Commented Aug 2, 2013 at 1:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.