Displaying 1 result from an estimated 1 matches for "timeout_error".
2010 Apr 14
4
PostgreSQL driver supporting [round-robin] load balancing and redundancy [LONG]
...+#include <ctype.h>
+#include <stdlib.h>
+#include <time.h>
+#include <libpq-fe.h>
+
+/* macros */
+/* #define DEBUG */
+#ifdef DEBUG
+# define dprintf(args) i_info args
+#else
+# define dprintf(args)
+#endif
+
+#define DEINIT_ERROR "db driver deinit"
+#define TIMEOUT_ERROR "query timed out"
+
+/* constants */
+enum {
+ MULTI_PGSQL_POOL = 512,
+ MULTI_PGSQL_XACT_POOL = 1024,
+
+ TIMEOUT_UNIT = 1000,
+
+ RECONNECT_DELAY = 5 * TIMEOUT_UNIT,
+ USER_QUERY_LIFETIME = 60,
+
+ PGC_IO_TIMEOUT = 20,
+ MIN_QUERY_TIMEOUT = 10
+};
+
+/** general helper routines */...