wieck@postgresql.org writes:
> Bugfix
> Trying to connect to template0 left a global referenced buffer
> because the scan of pg_database wasn't ended properly before
> elog(FATAL).
This is a *seriously* bogus "fix". If elog(FATAL) fails to release
buffer references, that's a problem that needs a general solution.
Trying to guarantee that we'll clean up all open scans on a retail
basis before any elog(FATAL) is obviously hopeless.
I'm a bit surprised to hear that such a bug exists anyway; I would've
thought that the elog error recovery would clean this up correctly...
regards, tom lane