1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-16 06:01:02 +03:00

Keep track of the last active slot in the shared ProcState array, so

that search loops only have to scan that far and not through all maxBackends
entries.  This eliminates a performance penalty for setting maxBackends
much higher than the average number of active backends.  Also, eliminate
no-longer-used 'backend tag' concept.  Remove setting of environment
variables at backend start (except for CYR_RECODE), since none of them
are being examined by the backend any longer.
This commit is contained in:
Tom Lane
2000-11-12 20:51:52 +00:00
parent c48025e799
commit ebb0a20149
10 changed files with 153 additions and 235 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.65 2000/11/08 23:24:24 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.66 2000/11/12 20:51:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -225,7 +225,7 @@ dropdb(const char *dbname)
/*
* Check for active backends in the target database.
*/
if (DatabaseHasActiveBackends(db_id))
if (DatabaseHasActiveBackends(db_id, false))
{
heap_close(pgdbrel, AccessExclusiveLock);
elog(ERROR, "DROP DATABASE: database \"%s\" is being accessed by other users", dbname);