Re: limiting connections per user/database

From: Petr Jelínek <pjmodos(at)parba(dot)cz>
To: pgsql-patches(at)postgresql(dot)org
Cc: Alvaro Herrera <alvherre(at)surnet(dot)cl>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: limiting connections per user/database
Date: 2005-06-27 11:45:37
Message-ID: 42BFE6E1.2070708@parba.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

So now I have it all working including brand new alter database (this
would have to be doublechecked by somebody from core team) and using
proc array to get number of backends per database and per user.

My only concer now is that userid in PGPROC, does anybody have anything
against it ?

And one more thing about userid, at the time MyProc is inserted to proc
array we don't know userid, so I am now updating MyProc as soon as I
know it (check for connection limit is done afterwards).
There is another solution I know of - I could use flatfiles to get
userid before MyProc is stored in proc array (which is how we get
MyDatabaseId anyway).
What of those solutions is better in your opinion ?

Oh and atm those limits are not enforced for superusers, any objections ?

--
Regards
Petr Jelinek (PJMODOS)
www.parba.cz

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Atsushi Ogawa 2005-06-27 13:14:44 regexp_replace
Previous Message Andrew Dunstan 2005-06-27 11:45:19 Re: COPY FROM performance improvements