Re: idle connection timeout ...

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: idle connection timeout ...
Дата
Msg-id 23263.1035558168@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: idle connection timeout ...  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: idle connection timeout ...  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: idle connection timeout ...  ("Marc G. Fournier" <scrappy@hub.org>)
Re: idle connection timeout ...  (Andrew Sullivan <andrew@libertyrms.info>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
>> Well, there are two different things here.  I agree that if an app
>> is going to use persistent connections, it should be the app's
>> responsibility to manage them.  But a per-database, as opposed to
>> installation-wide, limit on number of connections seems like a
>> reasonable idea.  Note that the limit would result in new connections
>> being rejected, not old ones being summarily cut.

> But then the app is going to keep trying to connect over and over unless
> it knows something about why it can't connect.

So?  If it hits the installation-wide limit, you'll have the same
problem; and at that point the (presumably runaway) app would have
sucked up all the connections, denying service to other apps using other
databases.  I think Marc's point here is to limit his exposure to
misbehavior of any one client app, in a database server that is serving
multiple clients using multiple databases.

It occurs to me that a per-user connection limit is going to be the next
thing he asks for ;-).  We could implement that too, if we wanted.
(Not sure whether PGPROC stores the user id, but it easily could.)
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: idle connection timeout ...
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: idle connection timeout ...