projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc80a4b
)
Bugfix
author
Jan Wieck
<JanWieck@Yahoo.com>
Thu, 14 Dec 2000 23:51:35 +0000
(23:51 +0000)
committer
Jan Wieck
<JanWieck@Yahoo.com>
Thu, 14 Dec 2000 23:51:35 +0000
(23:51 +0000)
Trying to connect to template0 left a global referenced buffer
because the scan of pg_database wasn't ended properly before
elog(FATAL).
Jan
src/backend/utils/init/postinit.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/init/postinit.c
b/src/backend/utils/init/postinit.c
index 8333176e8310882ed017b699879df7522435166c..80f44d5b3874a85e252f8268fa4c1fb3a159d254 100644
(file)
--- a/
src/backend/utils/init/postinit.c
+++ b/
src/backend/utils/init/postinit.c
@@
-115,8
+115,12
@@
ReverifyMyDatabase(const char *name)
*/
dbform = (Form_pg_database) GETSTRUCT(tup);
if (! dbform->datallowconn)
+ {
+ heap_endscan(pgdbscan);
+ heap_close(pgdbrel, AccessShareLock);
elog(FATAL, "Database \"%s\" is not currently accepting connections",
name);
+ }
/*
* OK, we're golden. Only other to-do item is to save the MULTIBYTE