While adding automatic connection switching, @robacarp pointed out that PG supports this: https://github.com/amberframework/granite/pull/476/files#r1191411657 https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-TARGET-SESSION-ATTRS This would be a great enhancement :)