开发者

Programmatically drop all connections

At work, we do distributed testing, where rsync out to everyone elses machine and distribute out test files to speed up the testing p开发者_如何学Crocess. One issue we are running into is that if someone has an instance of pgadmin open, it won't let us reset the test database due to connections being open.

Is there any way we can programmatically kill connections in either ruby or pg that doesn't involve restarting the daemon?


Use pg_terminate_backend() to kill the connections you want to kill.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜