Re: changing MyDatabaseId - Mailing list pgsql-hackers

From Markus Wanner
Subject Re: changing MyDatabaseId
Date
Msg-id 4CE3BD5B.5050106@bluegap.ch
Whole thread Raw
In response to Re: changing MyDatabaseId  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On 11/17/2010 12:09 PM, Andres Freund wrote:
> I am thinking of a connection-pooler like setup. Quite often your main-load 
> goes towards a single database - in that situation you don't have to reset the 
> database id most of the time.

Okay, so that's what I'd call a connection-reset or something. Or
probably a re-authentication feature which allows switching users (and
thus permissions on that same database). Could make sense for a
connection pooler, yes. Not having to flush caches in that case could
even turn out to be a good win. And I think it's a lot simpler to just
switch the user than to switch the database. Such a feature looks more
promising to me. (Do we have other connection related and unchangeable
state?)

As side notes: for the bgworkers in Postgres-R, I'm currently re-using
existing backends. As they only do change set application, the amount of
connection-reset required is minimal (well, there isn't a client
connection for these kinds of backends, in the first place, but that's
another story). Plus they are always acting as superuser, no
authentication or user switching required in that case.

For parallel querying as well as async transactions, it might make sense
to be able to switch users but remain connected to the same database.

Regards

Markus Wanner


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: changing MyDatabaseId
Next
From: Itagaki Takahiro
Date:
Subject: Overlap operators for ARRAY and NULLs