Content #
There are two ways to make pg_ctl aware of where the PGDATA is:
- Setting an environment variable named PGDATA, containing the path of the data directory
- Using the –D command-line flag to specify the path to the data directory
There are three ways of stopping a cluster:
- 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.
- The fast mode will immediately disconnect every client and will shut down the server without having to wait.Getting to Know Your Cluster
- 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).