Trying to connect to template0 left a global referenced buffer
because the scan of pg_database wasn't ended properly before
elog(FATAL).

Jan
This commit is contained in:
Jan Wieck 2000-12-14 23:51:35 +00:00
parent c3641483c3
commit 4ea746a84f

View file

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.74 2000/11/30 08:46:25 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.75 2000/12/14 23:51:35 wieck Exp $
* *
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
@ -115,8 +115,12 @@ ReverifyMyDatabase(const char *name)
*/ */
dbform = (Form_pg_database) GETSTRUCT(tup); dbform = (Form_pg_database) GETSTRUCT(tup);
if (! dbform->datallowconn) if (! dbform->datallowconn)
{
heap_endscan(pgdbscan);
heap_close(pgdbrel, AccessShareLock);
elog(FATAL, "Database \"%s\" is not currently accepting connections", elog(FATAL, "Database \"%s\" is not currently accepting connections",
name); name);
}
/* /*
* OK, we're golden. Only other to-do item is to save the MULTIBYTE * OK, we're golden. Only other to-do item is to save the MULTIBYTE