pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Albert Cardona <acardona@ini.phys.ethz.ch>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: how to monitor the amount of bytes fetched in a executeQuery()
Date: Thu, 13 Jul 2006 10:14:14 +1200
Message-ID: <44B57436.9040308@opencloud.com> (raw)
In-Reply-To: <200607121500.01107.acardona@ini.phys.ethz.ch>
References: <2F2A7EB72EBAF24582513E72ACCBCAAE11A2D6@kniexch01.KineticNetworks.com>
	<200607120856.12722.acardona@ini.phys.ethz.ch>
	<44B56D9A.5030302@opencloud.com>
	<200607121500.01107.acardona@ini.phys.ethz.ch>

Albert Cardona wrote:

> I will have a look at the code myself but I'm not familiar with it -you say 
> it's at PGconnection class?

org.postgresql.PGConnection is our extension interface that applications 
use to get access to driver-specific features. The actual implementation 
would go in AbstractJdbc2Connection which would delegate to the 
protocol-level code in org/postgresql/core/* to get stats from the 
underlying connection. Looks like you may need to play with PGStream so 
it actually tracks the byte count, unless one of the wrapping streams 
already does that.

app code would look something like this:

   Connection c = /* get connection */;
   if (c instanceof PGConnection) {
     PGConnection pgc = (PGConnection)c;
     long byteCount = pgc.getInputByteCount(); // or whatever
   }

-O



view thread (7+ messages)

Message-ID: <44B57436.9040308@opencloud.com>
Permalink:  ../44B57436.9040308@opencloud.com/
Also on:    postgresql.org/message-id/44B57436.9040308@opencloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, acardona@ini.phys.ethz.ch
  Subject: Re: how to monitor the amount of bytes fetched in a executeQuery()
  In-Reply-To: <44B57436.9040308@opencloud.com>
  References: <2F2A7EB72EBAF24582513E72ACCBCAAE11A2D6@kniexch01.KineticNetworks.com> <200607120856.12722.acardona@ini.phys.ethz.ch> <44B56D9A.5030302@opencloud.com> <200607121500.01107.acardona@ini.phys.ethz.ch> <44B57436.9040308@opencloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox