pg_ctl

pg_ctl

Content #

There are two ways to make pg_ctl aware of where the PGDATA is:

  1. Setting an environment variable named PGDATA, containing the path of the data directory
  2. Using the –D command-line flag to specify the path to the data directory

There are three ways of stopping a cluster:

  1. The smart mode means that the PostgreSQL cluster will gently wait for all the connected clients to disconnect and only then will it shut the cluster down.
  2. The fast mode will immediately disconnect every client and will shut down the server without having to wait.Getting to Know Your Cluster
  3. The immediate mode will abort every PostgreSQL process, including client connections, and shut down the cluster in a dirty way, meaning that the server will need some specific activity on the restart to clean up such dirty data (more on this in the next chapters).

From #