mirror of https://github.com/zulip/zulip.git
scripts: Don't terminate current session in terminate-psql-sessions.
This is a prep commit. Running terminate-psql-sessions command on docker-zulip results in the script exiting with non-zero exit status 2. This is because the current session also gets terminated while running terminate-psql-sessions command. To prevent that from happening we don't terminate the session created by terminate-psql-sessions.
This commit is contained in:
parent
b40c8bd9cd
commit
f2ce856b8f
|
@ -32,5 +32,6 @@ SELECT pg_terminate_backend(s.pid)
|
|||
WHERE
|
||||
s.datname IN ($tables)
|
||||
AND r.rolname = CURRENT_USER
|
||||
AND (s.usename = r.rolname OR r.rolsuper = 't');
|
||||
AND (s.usename = r.rolname OR r.rolsuper = 't')
|
||||
AND s.pid <> pg_backend_pid();
|
||||
EOF
|
||||
|
|
Loading…
Reference in New Issue