dsn1 = (
    """host=server1 user=testdb dbname=testdb sslcert=cert1.crt sslmode=verify-full sslkey=cert1.key sslrootcert=root1.crt"""
    )
conn1 = psycopg2.connect(dsn1)
dsn2 = (
    """host=server2 user=testdb dbname=testdb sslcert=cert1.crt sslmode=verify-full sslkey=cert1.key sslrootcert=root1.crt"""
    )
Postgres - несколько SSL-соединений python