0

At work, we do distributed testing, where rsync out to everyone elses machine and distribute out test files to speed up the testing process. 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?

2

1 Answer 1

4

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.