<div dir="ltr">In the docs for the connection_cache parameter, it states that: "connections to template0, template1, postgres and regression databases are not cached even if connection_cache is on."<div><br></div><div>This behavior appears to date from commit 32a44be0e8 in 2015, which fixed a client connection leak (<a href="https://www.pgpool.net/pipermail/pgpool-general/2015-January/003438.html">https://www.pgpool.net/pipermail/pgpool-general/2015-January/003438.html</a>), but looking at the mailing list archives there was not really any discussion of whether it was appropriate to exempt the "postgres" database from connection caching, and this behavior came as a bit of an unpleasant surprise when I ran across it.</div><div><br></div><div>The Postgresql docs at <a href="https://www.postgresql.org/docs/current/app-initdb.html">https://www.postgresql.org/docs/current/app-initdb.html</a> state: </div><div><br></div><div>"The postgres database is a default database meant for use by users, utilities and third party applications. template1 and template0 are meant as source databases to be copied by later CREATE DATABASE commands."<br></div><div><br></div><div>It makes sense that the template databases would be treated specially here, but I think a hardcoded exemption for the default user database is non-intuitive and I'm curious to know what the reasoning was behind this decision?</div><div><br></div><div>-n</div></div>