the last PR added the pgbouncer auth_user function to the template1 db. I guess this introduced this issue but I'm not sure:
postgres=# create database testdb;
CREATE DATABASE
postgres=# CREATE USER testuser WITH PASSWORD 'test';
CREATE ROLE
postgres=# grant all privileges on database testdb to testuser;
GRANT
postgres=# \q
root@patroni2:~# psql -h 192.168.100.105 -p 5000 -U testuser -d testdb
Password for user testuser:
psql (15.3 (Ubuntu 15.3-1.pgdg22.04+1))
Type "help" for help.
testdb=>
testdb=>
testdb=> \q
root@patroni2:~# psql -h 192.168.100.105 -p 5000 -U postgres
Password for user postgres:
psql (15.3 (Ubuntu 15.3-1.pgdg22.04+1))
Type "help" for help.
postgres=# drop database testdb;
ERROR: database "testdb" is being accessed by other users
DETAIL: There are 2 other sessions using the database.
Hi,
the last PR added the pgbouncer auth_user function to the template1 db. I guess this introduced this issue but I'm not sure:
A couple of minutes later the session of the
testuser
is closed but thepgbouncer
remains idle: