src/server/plugins/postgresql/resource.c

changeset 390
144332e23ffd
parent 389
c6c5638e97b8
equal deleted inserted replaced
389:c6c5638e97b8 390:144332e23ffd
49 return NULL; 49 return NULL;
50 } 50 }
51 51
52 // test connection 52 // test connection
53 PGconn *test_connection = PQconnectdb(connection); 53 PGconn *test_connection = PQconnectdb(connection);
54 if(pg_check_connection(LOG_WARN, rpname, test_connection)) { 54 // pg_check_connections logs errors, so we don't really need to handle
55 log_ereport(LOG_WARN, "Resource pool %s: Connection check failed", rpname); 55 // any error here
56 } 56 pg_check_connection(LOG_WARN, rpname, test_connection);
57 if(test_connection) PQfinish(test_connection); 57 if(test_connection) PQfinish(test_connection);
58 58
59 PgResourcePool *pg = pool_malloc(pool, sizeof(PgResourcePool)); 59 PgResourcePool *pg = pool_malloc(pool, sizeof(PgResourcePool));
60 if(!pg) { 60 if(!pg) {
61 return NULL; 61 return NULL;

mercurial