Re: limiting connections per user/database

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: limiting connections per user/database
Дата
Msg-id Pine.OSF.4.61.0506262207320.153374@kosh.hut.fi
обсуждение исходный текст
Ответ на Re: limiting connections per user/database  (Petr Jelínek <pjmodos@parba.cz>)
Список pgsql-patches
On Sun, 26 Jun 2005, Petr Jelínek wrote:

> Alvaro Herrera wrote:
>
>> Maybe you could make some checks against the shared array of PGPROCs
>> (procarray.c), for the per-database limit at least.  Not sure about
>> per-user limit.
>>
> Thats good idea (I could maybe add userid to PGPROC struct too) but I think
> there could be problem with two phase commits because they add new entry to
> that array of PGPROCs too and I don't kow if we want to include them to that
> limit.

You can ignore PGPROCs that belong to prepared transactions. They have 0
in the pid field, see TransactionIdIsActive and
CountActiveBackends functions in procarray.c for an example.

- Heikki

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

Предыдущее
От: Petr Jelínek
Дата:
Сообщение: Re: limiting connections per user/database
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: limiting connections per user/database