Re: limiting connections per user/database - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: limiting connections per user/database
Date
Msg-id 20050626191622.GC7459@surnet.cl
Whole thread Raw
In response to Re: limiting connections per user/database  (Petr Jelínek <pjmodos@parba.cz>)
Responses Re: limiting connections per user/database
List pgsql-patches
On Sun, Jun 26, 2005 at 08:52:55PM +0200, 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.

Prepared transactions can be filtered out by checking the pid struct
member.  I'm not sure if anybody would object to adding the
authenticated user Id to ProcArray, but I don't see why not.

--
Alvaro Herrera (<alvherre[a]surnet.cl>)
"In Europe they call me Niklaus Wirth; in the US they call me Nickel's worth.
 That's because in Europe they call me by name, and in the US by value!"

pgsql-patches by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: limiting connections per user/database
Next
From: Andrew Dunstan
Date:
Subject: Re: [HACKERS] language handlers in public schema?