From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Cc: | Petr Jelinek <pjmodos(at)parba(dot)cz>, Stephen Frost <sfrost(at)snowman(dot)net> |
Subject: | Re: per user/database connections limit again |
Date: | 2005-08-01 14:13:18 |
Message-ID: | 200508011413.j71EDIK02857@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
An updated version of your patch has been applied and will be in 8.1. Thanks.
---------------------------------------------------------------------------
pgman wrote:
>
> I have "worked over" your patch and I think it is ready for application.
>
> I changed the syntax to CONNECTION LIMIT, which seems most natural. We
> could skip CONNECTION and just use a LIMIT keyword, but that seems too
> terse.
>
> I removed your use of the pg_auth flat file. By the time you have the
> PROC entry to do your lookups, you might as well just use the system
> cache.
>
> There is a race condition in the code because we set our PROC entry
> before we check for other entries. If there is one connection left and
> two backends do this at the same time, they would both fail, while one
> should fail and the other succeed. Without a lock, I see no way to avoid
> it so I just commented it in the code.
>
> Also, I felt that zero should mean allow no/zero connections, rather
> than representing unlimited connections. I used -1 for unlimited. We
> can either document the use of -1, or add syntax to allow NO CONNECTION
> LIMIT, or something like that.
>
> The patch requires a catalog version update when applied.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-08-01 14:19:06 | Re: per user/database connections limit again |
Previous Message | Bruce Momjian | 2005-08-01 14:08:40 | Re: per user/database connections limit again |