Hello,
We are thinking about using a (java based) connection pool.
An issue is that there are many different users to connect.
My idea is to only have superuser connections in the pool
and change the connection role (with SET ROLE) each time
a user pick a connection there.
However, I'have noticed that the RESET ROLE command does not reset the
search_path to its original.
Could this be considered as bug (see below) ?
Are there other side effects to expect, or a better approach to
implement a multi user connection pool ?
(I'm also using GUC variables at some places, currently bound to the
pg_backend_pid().
Here I will have to add the current_user within the GUC name to better
isokate them)
show search_path;
"$user",public
SET ROLE 'xxx';
show search_path;
xxx,public
RESET ROLE
show search_path;
xxx,public
best regards,
Marc Mamin