Sun, 25 Sep 2022 10:51:47 +0200
reduce log warnings in case pg_check_connection fails
src/server/plugins/postgresql/resource.c | file | annotate | diff | comparison | revisions |
--- a/src/server/plugins/postgresql/resource.c Sun Sep 25 10:47:49 2022 +0200 +++ b/src/server/plugins/postgresql/resource.c Sun Sep 25 10:51:47 2022 +0200 @@ -51,9 +51,9 @@ // test connection PGconn *test_connection = PQconnectdb(connection); - if(pg_check_connection(LOG_WARN, rpname, test_connection)) { - log_ereport(LOG_WARN, "Resource pool %s: Connection check failed", rpname); - } + // pg_check_connections logs errors, so we don't really need to handle + // any error here + pg_check_connection(LOG_WARN, rpname, test_connection); if(test_connection) PQfinish(test_connection); PgResourcePool *pg = pool_malloc(pool, sizeof(PgResourcePool));