Re: [HACKERS] TODO Done. Superuser backend slot reservations

2002-08-26 Thread Nigel J. Andrews
On Mon, 26 Aug 2002, Bruce Momjian wrote: > Tom Lane wrote: > > "Nigel J. Andrews" <[EMAIL PROTECTED]> writes: > > > I was taking the line that the last slots in the array are > > > reserved. Those are not going to be taken by non su connections. > > > > But that doesn't do the job, does it? My

Re: [HACKERS] TODO Done. Superuser backend slot reservations

2002-08-26 Thread Bruce Momjian
Tom Lane wrote: > "Nigel J. Andrews" <[EMAIL PROTECTED]> writes: > > I was taking the line that the last slots in the array are > > reserved. Those are not going to be taken by non su connections. > > But that doesn't do the job, does it? My view of the feature is that > when there are at least

Re: [HACKERS] TODO Done. Superuser backend slot reservations

2002-08-26 Thread Tom Lane
"Nigel J. Andrews" <[EMAIL PROTECTED]> writes: > I was taking the line that the last slots in the array are > reserved. Those are not going to be taken by non su connections. But that doesn't do the job, does it? My view of the feature is that when there are at least MaxBackends - ReservedBacken

Re: [HACKERS] TODO Done. Superuser backend slot reservations

2002-08-26 Thread Nigel J. Andrews
On Mon, 26 Aug 2002, Tom Lane wrote: > "Nigel J. Andrews" <[EMAIL PROTECTED]> writes: > > + if (!superuser() && MyBackendId > MaxBackends - ReservedBackends) > > + elog(ERROR, "Normal user limit exceeded"); > > This coding is wrong on its face: the slot number you happen to find has

Re: [HACKERS] TODO Done. Superuser backend slot reservations

2002-08-25 Thread Tom Lane
"Nigel J. Andrews" <[EMAIL PROTECTED]> writes: > + if (!superuser() && MyBackendId > MaxBackends - ReservedBackends) > + elog(ERROR, "Normal user limit exceeded"); This coding is wrong on its face: the slot number you happen to find has no relationship to the number of slots remai

[HACKERS] TODO Done. Superuser backend slot reservations

2002-08-25 Thread Nigel J. Andrews
TODO item: Administration - Reserve last few process slots for super-user if max_connections reached Notes: Added GUC superuser_reserved_connections such that non-superuser connections are only acceptable in the first (max_connections - superuser_reserved_connections) backend