RESET ROLE and search_path, Connection pool - Mailing list pgsql-general

From Marc Mamin
Subject RESET ROLE and search_path, Connection pool
Date
Msg-id C4DAC901169B624F933534A26ED7DF31034BB961@JENMAIL01.ad.intershop.net
Whole thread Raw
Responses Re: RESET ROLE and search_path, Connection pool
List pgsql-general
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







pgsql-general by date:

Previous
From: Devrim GÜNDÜZ
Date:
Subject: Re: PostgreSQL 9.0 RPMs for RHEL 6 and Fedora 14 released
Next
From: "James B. Byrne"
Date:
Subject: Re: PG84 and SELinux