Quantcast
Channel: how to nicely stop all postgres processes - Ask Ubuntu
Browsing all 5 articles
Browse latest View live

Answer by Gino for how to nicely stop all postgres processes

You can simply run the commandsystemctl stop postgresqlWhen you wish to restart it runsystemctl start postgresqlIt is likely these commands will require you to append sudo

View Article



Answer by Nam G VU for how to nicely stop all postgres processes

This work for meref. https://stackoverflow.com/a/5408501/248616SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = 'YOUR_NAME';

View Article

Answer by dland for how to nicely stop all postgres processes

It makes me nervous seeing kill and postgres in the same command. To answer the question using only pg_ctl, that would be:pg_ctl -D $(psql -Xtc 'show data_directory') stopThe -X argument says to ignore...

View Article

Answer by Craig Ringer for how to nicely stop all postgres processes

It's safe to:sudo pkill -u postgresThat kills all processes running as user postgres. Or:pkill postgresThat kills all processes named 'postgres'.Do not use kill -9 (kill -KILL). Just kill (without...

View Article

how to nicely stop all postgres processes

How do you nicely stop all postgres processes with pg_ctl (or otherwise), when you don't recall what the database directory is, nor have the PGDATA environment variable defined?

View Article

Browsing all 5 articles
Browse latest View live




Latest Images