
I've been usin psql for quite a long time and I found it to be very
comfortable. Since some web providers in my country refuse to put psql
while some thing are still in psql TODO list, I'm interested in
following...


I'd like to know when are you planning to deal with this TODO item:

Allow limits on per-db/user connections

I would appreciate if it was as soon as possible. Thanks.

Best regards, Marko Zmak.

Can't stop the Zmak
%|&|^|~|`|'|@|}|#|%

Wed, 17 Dec 2003 21:34:17 +0100 (CET)
Marko Zmak <xmak@sharanet.org>
TODO list
Marko Zmak wrote:
> 
> I've been usin psql for quite a long time and I found it to be very
> comfortable. Since some web providers in my country refuse to put psql
> while some thing are still in psql TODO list, I'm interested in
> following...
> 
> 
> I'd like to know when are you planning to deal with this TODO item:
> 
> Allow limits on per-db/user connections
> 
> I would appreciate if it was as soon as possible. Thanks.

I know of no one working on this feature.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Wed, 17 Dec 2003 15:52:34 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: TODO list
On Wed, 17 Dec 2003, Bruce Momjian wrote:

> Marko Zmak wrote:
> >
> > I've been usin psql for quite a long time and I found it to be very
> > comfortable. Since some web providers in my country refuse to put psql
> > while some thing are still in psql TODO list, I'm interested in
> > following...
> >
> >
> > I'd like to know when are you planning to deal with this TODO item:
> >
> > Allow limits on per-db/user connections
> >
> > I would appreciate if it was as soon as possible. Thanks.
>
> I know of no one working on this feature.

But I'm sure no one would have a problem with Marko attempting it :-).

Gavin

Thu, 18 Dec 2003 08:07:03 +1100 (EST)
Gavin Sherry <swm@linuxworld.com.au>
Re: TODO list
--On Thursday, December 18, 2003 08:07:03 +1100 Gavin Sherry 
<swm@linuxworld.com.au> wrote:

> On Wed, 17 Dec 2003, Bruce Momjian wrote:
>
>> Marko Zmak wrote:
>> >
>> > I've been usin psql for quite a long time and I found it to be very
>> > comfortable. Since some web providers in my country refuse to put psql
>> > while some thing are still in psql TODO list, I'm interested in
>> > following...
>> >
>> >
>> > I'd like to know when are you planning to deal with this TODO item:
>> >
>> > Allow limits on per-db/user connections
>> >
>> > I would appreciate if it was as soon as possible. Thanks.
>>
>> I know of no one working on this feature.
>
> But I'm sure no one would have a problem with Marko attempting it :-).
I also know that Olivier PRENANT was looking for something similar.  And 
the same admonition goes.  I.E., you have an itch, we'd love to see you 
scratch it.

LER

>
> Gavin
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>



-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
Wed, 17 Dec 2003 15:13:00 -0600
Larry Rosenman <ler@lerctr.org>
Re: TODO list
> Marko Zmak wrote:
>>
>> I've been usin psql for quite a long time and I found it to be very
>> comfortable. Since some web providers in my country refuse to put psql
>> while some thing are still in psql TODO list, I'm interested in
>> following...
>>
>>
>> I'd like to know when are you planning to deal with this TODO item:
>>
>> Allow limits on per-db/user connections
>>
>> I would appreciate if it was as soon as possible. Thanks.
>
> I know of no one working on this feature.
>

Is this something a someone who is new to PostgreSQL development can
attempt? Does someone already have a design planned out?


-- 
Jonathan Gardner
jgardner@jonathangardner.net



Wed, 17 Dec 2003 13:38:56 -0800 (PST)
"Jonathan Gardner" <jgardner@jonathangardner.net>
Re: TODO list
Jonathan Gardner wrote:

>>Marko Zmak wrote:
>>    
>>
>>>I've been usin psql for quite a long time and I found it to be very
>>>comfortable. Since some web providers in my country refuse to put psql
>>>while some thing are still in psql TODO list, I'm interested in
>>>following...
>>>
>>>
>>>I'd like to know when are you planning to deal with this TODO item:
>>>
>>>Allow limits on per-db/user connections
>>>
>>>I would appreciate if it was as soon as possible. Thanks.
>>>      
>>>
>>I know of no one working on this feature.
>>
>>    
>>
>
>Is this something a someone who is new to PostgreSQL development can
>attempt? Does someone already have a design planned out?
>
>
>  
>

Before we even get there we need agreement on exactly what it means :-)

Seems like the best place for the settings might be pg_hba.conf.

Say we have a new keyword "limit" there. Here are the possibilities (I 
think):

case 1 - limit username's connections to dbname:
limit dbname username n
case2 - limit username's connections regardless of database:
limit all username n
case 3 - limit all users' connections to dbname:
limit dbname all n
case 4 - limit username's connections to any particular database:
limit any username n
case 5 - limit all users' connections to any particular database:
limit any all n
case 6 - limit all users' connections regardless of database:
limit all all n

Would we want to bother about cases 4 and 5? Are the semantics of case 6 
what we want?

Once the behaviour is agreed, (based on my recent experience) I think 
this is something that might well be attempted by someone new to Pg 
development. If you ask questions you will get plenty of help.

cheers

andrew





Wed, 17 Dec 2003 17:13:02 -0500
Andrew Dunstan <andrew@dunslane.net>
Re: TODO list
Andrew Dunstan <andrew@dunslane.net> writes:
> case 6 - limit all users' connections regardless of database:
> limit all all n

That's called max_connections.  Don't think we need a redundant
implementation of same ...

Another little nitpick is that I don't like assuming that "any" and
"all" are never going to be used as database or user names.  (I know
that pg_hba.conf already uses "all" this way, and IMHO that was a bogus
decision.  Something like "*" would have been less likely to collide.)

On an implementation level, where are you thinking of enforcing this?
pg_hba.conf would not be very appropriate for the most likely place to
put it, which is in backend startup shortly after establishing a PGPROC
entry (with the data about numbers of active connections obtained by
scanning the PGPROC array for other backends connected to the same
database or with the same userid).  I think we've thrown away the
PostmasterContext long before that, so we couldn't use cached
pg_hba.conf data without some redesign of the startup sequence.

			regards, tom lane

Wed, 17 Dec 2003 17:45:39 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: TODO list 
-*- Tom Lane <tgl@sss.pgh.pa.us> [ 2003-12-17 22:46 ]:
> Andrew Dunstan <andrew@dunslane.net> writes:
> > case 6 - limit all users' connections regardless of database:
> > limit all all n
> 
> That's called max_connections.  Don't think we need a redundant
> implementation of same ...
> 
> Another little nitpick is that I don't like assuming that "any" and
> "all" are never going to be used as database or user names.  (I know
> that pg_hba.conf already uses "all" this way, and IMHO that was a bogus
> decision.  Something like "*" would have been less likely to collide.)
> 
> On an implementation level, where are you thinking of enforcing this?
> pg_hba.conf would not be very appropriate for the most likely place to
> put it, which is in backend startup shortly after establishing a PGPROC
> entry (with the data about numbers of active connections obtained by
> scanning the PGPROC array for other backends connected to the same
> database or with the same userid).  I think we've thrown away the
> PostmasterContext long before that, so we couldn't use cached
> pg_hba.conf data without some redesign of the startup sequence.

I'd like to mention that administrators likely to use the this feature would probably like to be able to tune this without having to modify a file -- updating via SQL (=> storing this in a system table) would be extremely nice...

-- 
Regards,
Tolli
tolli@tol.li

Wed, 17 Dec 2003 23:03:48 +0000
=?iso-8859-1?Q?=DE=F3rhallur_H=E1lfd=E1narson?= <tolli@tol.li>
Re: TODO list
ï¿½ï¿½rhallur Hï¿½lfdï¿½narson said:
>
> I'd like to mention that administrators likely to use the this feature
> would probably like to be able to tune this without having to modify a
> file -- updating via SQL (=> storing this in a system table) would be
> extremely nice...
>


We set connection permissions in a config file - why would we not use the
same mechanism for connection limits?

I'm not objecting, but I think we should be consistent.

cheers

andrew



Wed, 17 Dec 2003 21:39:51 -0500 (EST)
"Andrew Dunstan" <andrew@dunslane.net>
Re: TODO list
Yeah...
That would help me soooo much, that would soooo cool...

According to what I read on the subject after I got this mail, could we
envison something like:

ALTER DATABASE xxx SET max_connection to 100;
?

Regards
On Wed, 17 Dec 2003, Larry Rosenman wrote:

> Date: Wed, 17 Dec 2003 15:13:00 -0600
> From: Larry Rosenman <ler@lerctr.org>
> To: Gavin Sherry <swm@linuxworld.com.au>,
>      Bruce Momjian <pgman@candle.pha.pa.us>
> Cc: Marko Zmak <xmak@sharanet.org>, pgsql-hackers@postgresql.org,
>      Olivier PRENANT <ohp@pyrenet.fr>
> Subject: Re: [HACKERS] TODO list
>
>
>
> --On Thursday, December 18, 2003 08:07:03 +1100 Gavin Sherry
> <swm@linuxworld.com.au> wrote:
>
> > On Wed, 17 Dec 2003, Bruce Momjian wrote:
> >
> >> Marko Zmak wrote:
> >> >
> >> > I've been usin psql for quite a long time and I found it to be very
> >> > comfortable. Since some web providers in my country refuse to put psql
> >> > while some thing are still in psql TODO list, I'm interested in
> >> > following...
> >> >
> >> >
> >> > I'd like to know when are you planning to deal with this TODO item:
> >> >
> >> > Allow limits on per-db/user connections
> >> >
> >> > I would appreciate if it was as soon as possible. Thanks.
> >>
> >> I know of no one working on this feature.
> >
> > But I'm sure no one would have a problem with Marko attempting it :-).
> I also know that Olivier PRENANT was looking for something similar.  And
> the same admonition goes.  I.E., you have an itch, we'd love to see you
> scratch it.
>
> LER
>
> >
> > Gavin
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 7: don't forget to increase your free space map settings
> >
>
>
>
>

-- 
Olivier PRENANT        	        Tel: +33-5-61-50-97-00 (Work)
6, Chemin d'Harraud Turrou           +33-5-61-50-97-01 (Fax)
31190 AUTERIVE                       +33-6-07-63-80-64 (GSM)
FRANCE                          Email: ohp@pyrenet.fr
------------------------------------------------------------------------------
Make your life a dream, make your dream a reality. (St Exupery)

Thu, 18 Dec 2003 15:07:16 +0100 (MET)
ohp@pyrenet.fr
Re: TODO list