Displaying 1 result from an estimated 1 matches for "timeout_unit".
2010 Apr 14
4
PostgreSQL driver supporting [round-robin] load balancing and redundancy [LONG]
...ine 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 */
+static char *kill_pg_errmsg_newline(char *s)
+{
+ char *r;
+ unsigned c;
+
+ r = s;
+ while ((c = *r) && c != '\n'...