Displaying 1 result from an estimated 1 matches for "query_q".
2010 Apr 14
4
PostgreSQL driver supporting [round-robin] load balancing and redundancy [LONG]
...t_query_on_pgc(pgc);
+}
+
+/** pgdb */
+struct multi_pgsql_db {
+ struct sql_db api;
+
+ unsigned n_pgcs;
+ struct multi_pgsql_pgc *pgcs;
+
+ struct {
+ struct multi_pgsql_pgc *first, **link_to;
+ } pgc_q;
+
+ struct {
+ struct timeout *timeout;
+ struct multi_pgsql_query *first, **link_to;
+ } query_q;
+
+ pool_t pool;
+};
+
+static struct multi_pgsql_query *dequeue_query_from_pgdb(struct multi_pgsql_db *);
+
+/*** pgc support code */
+static void do_init_pgcs(struct multi_pgsql_db *pgdb, char const *s, unsigned ofs)
+{
+ char const *r, *lws_start;
+ unsigned c, semi_count;
+
+ while ((c = *s)...