You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every scan of a pg_lake_remote table opens a new connection to its query engine, and closes it when the statement ends. That's cheap for an engine on a local socket. An engine on another host, though, pays for a TCP connection, a TLS handshake and authentication on every scan, and a query that reads several of its tables pays it once per table.
As in postgres_fdw, connections could be cached per backend, keyed by server and user mapping, and reused across statements. That needs:
invalidation when the server or the user mapping changes;
discarding a connection that failed, or that a cancelled or aborted transaction left in an unknown state;
keeping the session settings pg_lake sends on a connection, such as TimeZone, right on a reused connection;
a way to list and close cached connections, like postgres_fdw_get_connections() and postgres_fdw_disconnect().
Activity