I've just made new patch - extended BufferedOutputStream and
VisibleBufferedInputStream, as you suggested. It works, and results are
comparable with tcpdump data (for received traffic). For sent traffic
they are incorrect, because I can't account all ACK, but only PGSQL
It's suprising, that received traffic is more then tcpdump shows ( 2%,
butt more). I thought it would be a bit smaller then actual data.
However, this data gives good approximation (2% for 100MB traffic is not
Craig Ringer wrote:
> On 18/12/2009 2:34 PM, Alexander Pyhalov wrote:
>> I've made patch for Postgres JDBC driver. Now driver accounts bytes
>> sent/received from client ing PGStream.
> Can't you extend or wrap the pg_input / pg_output streams to do the
> accounting in their read(...) / write(...) method instead? The way
> you've done it is rather fragile and is very prone to bitrot as other
> parts of the driver are changed.
> Craig Ringer
системный администратор ЮГИНФО ЮФУ.
In response to
pgsql-jdbc by date
|Next:||From: Maciek Sakrejda||Date: 2009-12-21 01:24:39|
|Subject: Re: Cheapest way to poll for notifications? & Driver improvement question re SSL and notify|
|Previous:||From: Craig Ringer||Date: 2009-12-19 07:24:53|
|Subject: Re: Cheapest way to poll for notifications?|