Re: on connect/on disconnect

Поиск
Список
Период
Сортировка
От Aaron Bono
Тема Re: on connect/on disconnect
Дата
Msg-id bf05e51c0609102210ree7629dw16f544fc451de7dc@mail.gmail.com
обсуждение исходный текст
Ответ на Re: on connect/on disconnect  (Robert Edwards <bob@cs.anu.edu.au>)
Список pgsql-sql
On 9/10/06, Robert Edwards <bob@cs.anu.edu.au> wrote:

As I understand it, connection pooling, as used by a web app, still
needs to connect "per-database-user" (and usually this is the same
"web-server" user). If the web app is connecting to the database
server as different database users, then different connections would
be set up. If the number of open connections exceeds the number
allowed to the database server, then older unused connections would
be terminated to allow new ones to be created. Is this correct?

Don't mean to get off topic but to answer your question...

Typically the web app has a single log in user.  You don't  have the user log into the database.  Connection pooling typically does not terminate connections to the database unless it decides to shrink the connection pool do to lack of use.  It doesn't disconnect when it exceeds the number of allowed users - it reuses the connections as much as possible to reduce the overhead of making connections.

Or is it possible, over the same connection, to change the database
user? My understanding of the frontend/backend protocol is that this
is not allowed.

I could not find this in the documentation - not sure.

Anyway, I still need to know if running functions during connection
setup and tear-down, or change of user, is possible or not.

 
If there is a table that keeps track of connection/disconnection you could put a trigger on that but I cannot find anything about this in the documentation.

Guess we will need feedback from someone more knowledgable than I...

==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
   http://codeelixir.com
==================================================================

В списке pgsql-sql по дате отправления:

Предыдущее
От: Richard Broersma Jr
Дата:
Сообщение: Re: where clause subqueries vs multiple rows results
Следующее
От: "Penchalaiah P."
Дата:
Сообщение: hi i am gettin error when i am deleting a function from my pgadmin