diff --git a/src/bin/pg_basebackup/streamutil.c b/src/bin/pg_basebackup/streamutil.c index 42e0cb10821..7b60a070765 100644 --- a/src/bin/pg_basebackup/streamutil.c +++ b/src/bin/pg_basebackup/streamutil.c @@ -212,7 +212,7 @@ GetConnection(void) * 10, so the search path cannot be changed (by us or attackers) on * earlier versions. */ - if (dbname != NULL && PQserverVersion(conn) >= 100000) + if (dbname != NULL && PQserverVersion(tmpconn) >= 100000) { PGresult *res;