Re: Switching roles as an replacement of connection pooling tools - Mailing list pgsql-general

From Francisco Olarte
Subject Re: Switching roles as an replacement of connection pooling tools
Date
Msg-id CA+bJJbxkN0EsUVOmOEgfWQ54eOi662o=5Mt+ARoeNEFV854yjA@mail.gmail.com
Whole thread Raw
In response to Switching roles as an replacement of connection pooling tools  (CN <cnliou9@fastmail.fm>)
List pgsql-general
On Tue, May 31, 2016 at 9:45 AM, CN <cnliou9@fastmail.fm> wrote:
...
> If command "SET SESSION AUTHORIZATION" is enhanced to accept two
> additional arguments
> PASSWORD <password>
...
> SET SESSION AUTHORIZATION user2 PASSWORD p2;
> SET SEARCH_PATH TO schema2,pg_category;
> Does my points make sense?

It does, but I feel it must be greatly expanded. If it does the same
as a reconnect it must accept the same kind of checks a login does (
pg_hba.conf ), which I think means putting some complicated and
somehow critical code in another place. And also it must specify how
it interacts with open transactions ( i.e. does it work like the
current command or like a reconnection ). It also means you have to
use passwords in your DDL/DML code, instead of keeping them hidden in
your connection setup code ( which makes it less atractive, for me at
least ).

> Is it eligible for feature request?

This is not for me to say, but I think it would complicate things too
much for a narrow use case ( and I doubt poolers are used for this
kind of things anyway ).

Francisco Olarte.


pgsql-general by date:

Previous
From: Thalis Kalfigkopoulos
Date:
Subject: Drop/Re-Creating database extremely slow + doesn't lose data
Next
From: Melvin Davidson
Date:
Subject: Re: Switching roles as an replacement of connection pooling tools