Re: limiting connections per user/database

From: Alvaro Herrera <alvherre(at)surnet(dot)cl>
To: Petr Jelínek <pjmodos(at)parba(dot)cz>
Cc: pgsql-patches(at)postgresql(dot)org, Euler Taveira de Oliveira <eulerto(at)yahoo(dot)com(dot)br>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: limiting connections per user/database
Date: 2005-06-26 19:16:22
Message-ID: 20050626191622.GC7459@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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!"

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2005-06-26 19:52:10 Re: language handlers in public schema?
Previous Message Heikki Linnakangas 2005-06-26 19:10:11 Re: limiting connections per user/database