I logged in to source database template1 and now I can't create database. When I try to create database, I get this error:
OperationalError: source database "template1" is being accessed by other users
DETAIL: There are 5 other session(s) using the database.
Every time I login to template1, I use 'exit' command to logout, but as you can see it does not logout and number of sessions increases everytime I login. Is there a way to force disconnect every connection to template1 that logged in now?
exit
command inpsql
. The command to leavepsql
is\q
(and you shouldn't log in/use the template database in the first place) – a_horse_with_no_name Jan 17 at 8:19