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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>
Cc: pgsql-patches(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] TODO Done. Superuser backend slot reservations
Date: 2002-08-26 04:04:24
Message-ID: 14081.1030334664@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

"Nigel J. Andrews" <nandrews(at)investsystems(dot)co(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Curt Sampson 2002-08-26 04:17:45 Re: Database Caching
Previous Message Christopher Kings-Lynne 2002-08-26 04:01:42 Re: PostgreSQL 7.2.2 and docs

Browse pgsql-patches by date

  From Date Subject
Next Message Karim Mribti 2002-08-26 06:05:55 PostgreSQL spanish translation.
Previous Message Tom Lane 2002-08-26 03:56:04 Re: [HACKERS] TODO Done. Superuser backend slot reservations