Introduce connection pool (#2829)

Make it hold connection kwargs for local connections and all `NamedConnection` objects use them automatically.

Also get rid of redundant `ConfigHandler.local_connect_kwargs`.

On top of that we will introduce a dedicated connection for the REST API thread.
This commit is contained in:
Alexander Kukushkin
2023-08-24 16:13:22 +02:00
committed by GitHub
parent 3333e78500
commit 89d794facc
9 changed files with 145 additions and 62 deletions
+1 -1
View File
@@ -176,7 +176,7 @@ class Bootstrap(object):
"""
cmd = config.get('post_bootstrap') or config.get('post_init')
if cmd:
r = self._postgresql.config.local_connect_kwargs
r = self._postgresql.connection_pool.conn_kwargs
connstring = self._postgresql.config.format_dsn(r, True)
if 'host' not in r:
# https://www.postgresql.org/docs/current/static/libpq-pgpass.html