From: | Petr Jelinek <pjmodos(at)parba(dot)cz> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: per user/database connections limit again |
Date: | 2005-07-29 12:34:21 |
Message-ID: | 42EA224D.9090107@parba.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Bruce Momjian wrote:
>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.
>
>
Yeah my working version was doing this too but I wanted to avoid lock on
PROC array and that race condition and because pg_auth is loaded anyway
I used it.
>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.
>
>
Right, maybe we could remove datallowconn from pg_database (in future)
if we can achieve same thing using datconnlimit = 0 ?
>The patch requires a catalog version update when applied.
>
>
Yes, thanks for your work on this patch, I will write documentation for
it in next few days.
--
Regards
Petr Jelinek (PJMODOS)
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-07-29 12:37:00 | Re: [PATCHES] COPY FROM performance improvements |
Previous Message | Luke Lonergan | 2005-07-29 04:07:12 | Re: [PATCHES] COPY FROM performance improvements |