artifact_id;status_id;status_name;priority;submitter_id;submitter_name;assigned_to_id;assigned_to_name;open_date;close_date;last_modified_date;summary;details;"Category";"Group";"Resolution"
1011107;1;"Open";3;100497;"Sean Chittenden";100956;"Marko Kreen";"2011-10-16 16:54";"";"2012-09-24 02:14";"Add the ability to log queries being sent by the client...";"In rare circumstances I've had failing Pg installs (due to bad hardware) crash before logging messages are fired off. The following makes it easier to diagnose problems. This isn't ideal, but hopefully it's workable. -sc

Index: src/client.c
===================================================================
RCS file: /cvsroot/pgbouncer/pgbouncer/src/client.c,v
retrieving revision 1.31
diff -u -r1.31 client.c
--- src/client.c	19 Jul 2010 07:30:15 -0000	1.31
+++ src/client.c	16 Oct 2011 16:53:06 -0000
@@ -295,6 +295,9 @@
 
 	/* one-packet queries */
 	case 'Q':		/* Query */
+      if (pkt->type == 'Q') {
+        slog_noise(client, ""Client sent query (%d): %.*s"", mbuf_size(&pkt->data), mbuf_size(&pkt->data), mbuf_get_string(&pkt->data));
+      }
 	case 'F':		/* FunctionCall */
 
 	/* copy end markers */
";"None";"None";"None"