Search code examples
postgresqlterminalpostgres.app

How do I stop (postgres.app) postgres cluster from command line


How do I stop a particular Postgres.app cluster without using the gui.

Instead of gui, I want to use bash/Terminal.app

stopping it via gui

I should also point out that, Postgres app has a menu like this

enter image description here

So if I do a kill, would the menu show an incorrect state?


Solution

  • Can be done using pg_ctl

    pg_ctl stop -D <path to postgres data dir>

    Example

    pg_ctl stop -D ~/Postgres/pg96/data