X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id BA53F11F629D for ; Tue, 28 Mar 2006 21:41:23 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 54633-09 for ; Tue, 28 Mar 2006 21:41:23 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail1.catalyst.net.nz (godel.catalyst.net.nz [202.78.240.40]) by postgresql.org (Postfix) with ESMTP id 3959211F65A6 for ; Tue, 28 Mar 2006 21:41:20 -0400 (AST) Received: from leibniz.catalyst.net.nz ([202.78.240.7] helo=[192.168.2.46]) by mail1.catalyst.net.nz with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1FOPgW-0001RM-2O for pgsql-jdbc@postgresql.org; Wed, 29 Mar 2006 13:41:20 +1200 Message-ID: <4429E5BC.9050604@catalyst.net.nz> Date: Wed, 29 Mar 2006 13:41:16 +1200 From: Kevin Dorne Organization: Catalyst IT Ltd. User-Agent: Thunderbird 1.5 (X11/20060212) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: Printing query durations References: <442890D9.40905@catalyst.net.nz> <1143541956.3839.329.camel@localhost.localdomain> In-Reply-To: <1143541956.3839.329.camel@localhost.localdomain> X-Enigmail-Version: 0.94.0.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig563E09D6FAD65604BC7131BF" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.096 required=5 tests=[AWL=0.096] X-Spam-Score: 0.096 X-Spam-Level: X-Archive-Number: 200603/133 X-Sequence-Number: 14914 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig563E09D6FAD65604BC7131BF Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Simon Riggs wrote: [...] >> Example output from an interactive query: >> LOG: duration: 109.524 ms statement: SELECT count(*) FROM transactio= n; >=20 > This is produced by log_min_duration_statement > -1 > These lines always have duration prefixes. Yes, that's what I would expect. My problem is that this setting only logs queries via psql; queries via JDBC don't get logged at all. >> Example output from a JDBC query: >> LOG: statement: SELECT count(*) FROM transaction; >=20 > This is produced by log_statement =3D 'all' > These lines never have durations.=20 > If you want the matching durations, use log_duration =3D on and read th= e > manual to see how to match them up. Yes, I've done that. Again, I can get those durations to appear for queries via psql, but not via JDBC. [...] By the way, the JDBC driver I'm using (thanks Markus Schaber for the tip) is "PostgreSQL 8.0 JDBC3 with SSL (build 311)". -k --------------enig563E09D6FAD65604BC7131BF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFEKeW/WPypEt5k4n0RAgQNAJ0SV5FNJcF4RAAabzGdAatyTtWWtACg1Gu3 /mbOjlXdfeaDcBOBT+J6f1I= =GZqO -----END PGP SIGNATURE----- --------------enig563E09D6FAD65604BC7131BF--