Re: TODO Done. Superuser backend slot reservations - Mailing list pgsql-hackers

From Tom Lane
Subject Re: TODO Done. Superuser backend slot reservations
Date
Msg-id 14081.1030334664@sss.pgh.pa.us
Whole thread Raw
In response to TODO Done. Superuser backend slot reservations  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
Responses Re: TODO Done. Superuser backend slot reservations  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
List pgsql-hackers
"Nigel J. Andrews" <nandrews@investsystems.co.uk> 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 remaining free, except as an
existence proof that the number of slots free was > 0 before you took
one.

            regards, tom lane

pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Re: PostgreSQL 7.2.2 and docs
Next
From: Curt Sampson
Date:
Subject: Re: Database Caching