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.
精彩评论