Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4ea746a

Browse files
Jan WieckJan Wieck
Jan Wieck
authored and
Jan Wieck
committed
Bugfix
Trying to connect to template0 left a global referenced buffer because the scan of pg_database wasn't ended properly before elog(FATAL). Jan
1 parent c364148 commit 4ea746a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/backend/utils/init/postinit.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.74 2000/11/30 08:46:25 vadim Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.75 2000/12/14 23:51:35 wieck Exp $
1212
*
1313
*
1414
*-------------------------------------------------------------------------
@@ -115,8 +115,12 @@ ReverifyMyDatabase(const char *name)
115115
*/
116116
dbform = (Form_pg_database) GETSTRUCT(tup);
117117
if (! dbform->datallowconn)
118+
{
119+
heap_endscan(pgdbscan);
120+
heap_close(pgdbrel, AccessShareLock);
118121
elog(FATAL, "Database \"%s\" is not currently accepting connections",
119122
name);
123+
}
120124

121125
/*
122126
* OK, we're golden. Only other to-do item is to save the MULTIBYTE

0 commit comments

Comments
 (0)