search for: reset_pgc

Displaying 1 result from an estimated 1 matches for "reset_pgc".

2010 Apr 14
4
PostgreSQL driver supporting [round-robin] load balancing and redundancy [LONG]
...oid init_pgc(struct multi_pgsql_pgc *pgc, + struct multi_pgsql_db *pgdb, char *connect_string) +{ + pgc->connect_string = connect_string; + pgc->pgdb = pgdb; + + dprintf(("%s: pgc %p, '%s'", __func__, pgc, connect_string)); + + start_pgc_connect(pgc); +} + +static void reset_pgc(struct multi_pgsql_pgc *pgc) +{ + dprintf(("%s: %p", __func__, pgc)); + + if (pgc->io) io_remove(&pgc->io); + if (pgc->timeout) timeout_remove(&pgc->timeout); + + if (pgc->pgr) { + PQclear(pgc->pgr); + pgc->pgr = NULL; + } + + if (pgc->pgc) { + PQfinis...