From: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
---|---|
To: | Petr Jelínek <pjmodos(at)parba(dot)cz> |
Cc: | pgsql-patches(at)postgresql(dot)org, Euler Taveira de Oliveira <eulerto(at)yahoo(dot)com(dot)br>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: limiting connections per user/database |
Date: | 2005-06-26 19:10:11 |
Message-ID: | Pine.OSF.4.61.0506262207320.153374@kosh.hut.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2005-06-26 19:16:22 | Re: limiting connections per user/database |
Previous Message | Petr Jelínek | 2005-06-26 18:52:55 | Re: limiting connections per user/database |