Search Postgresql Archives

RESET ROLE and search_path, Connection pool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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







-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux