Switching connection on the fly

From: "Shridhar Daithankar" <shridhar_daithankar(at)persistent(dot)co(dot)in>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Switching connection on the fly
Date: 2003-01-27 08:37:59
Message-ID: 3E353D3F.7283.9FA9C97@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

Recently solving a design problem for a friend, an idea crossed my mind.

Is it possible for an established connection to backend, to switch user on the
fly, if proper credentials are supplied?

If this can be done, it would avoid initialization penalty of a new conenction
and many applications which does their own user management, can deligate the
task to backend.

Many applications are written in such a way that application always connects
and operates as one user and does necessary access control. There are situatons
where such a design is best available choice.

If it can switch connection on the fly, it will allow to have much finer
control over database access.

That would help immensely for any applications that use connection pooling.
Right now, if an app uses connection pooling, it has to go via a single
application user and do all the things on it's own.

Besides I think this idea would be a smart implementation of what oracle called
thin/virtual users.

Any thoughts?

Bye
Shridhar

--
The First Rule of Program Optimization: Don't do it.The Second Rule of Program
Optimization (for experts only!): Don't do it yet. -- Michael Jackson

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonio Scotti 2003-01-27 09:57:57 On Commit Triggers?
Previous Message Dave Page 2003-01-27 08:13:38 Re: Have a PG 7.3.1 Windows (cygwin) easy installer... now what to do with it?