Re: Re: [PATCHES] Re: Fixes and enhancements to JDBC driver (take 2)

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter T Mount <peter(at)retep(dot)org(dot)uk>
Cc: "Gunnar R|nning" <gunnar(at)candleweb(dot)no>, Barry Lind <barry(at)xythos(dot)com>, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Re: [PATCHES] Re: Fixes and enhancements to JDBC driver (take 2)
Date: 2001-01-24 14:13:58
Message-ID: 200101241413.JAA14544@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces pgsql-patches


Gunnar, everyone, can people check the CVS or snapshot and make sure you
are happy. This has been a confusing item for me, and I want to make
sure we have it working as intended.

Thanks.

[ Charset ISO-8859-1 unsupported, converting... ]
> Quoting Gunnar R|nning <gunnar(at)candleweb(dot)no>:
>
> > Barry Lind <barry(at)xythos(dot)com> writes:
> >
> > > Gunner,
> > >
> > > Do your fixes address the concerns I raised on 12/21? (I have
> > included
> > > that email to the list below). To summarize the three major
> > > concerns/bugs were:
> > > 1) Code incorrectly deallocates when a new statement is executed,
> > even
> > > though the byte[]s are still being used.
> > > 2) The cache isn't limited in size, resulting in essentially memory
> > > leaks for long lived connections in a connection pool.
> > > 3) The implementation is limited to a max 256 byte byte[], whereas my
> > > queries have many values that exceed this size, and the current
> > > implementation doesn't lend itself well (because of #2) to cache
> > things
> > > upto 8K in size.
> >
> > The original patch that I supplied was a proof of concept on what kind
> > of
> > performance improvements that could be made by reusing byte arrays.
> > This
> > was unfortunately committed before anybody but me had done any testing
> > at
> > all on it.
> >
> > The most serious problem with this code was your issue 1). Number 2) and
> > 3)
> > should be easy to handle has config parameters. The reason for
> > hardcoding
> > 3) to 256 was simply because I found this to be the most optimal value
> > for
> > the web application I was doing the testing on.
> >
> > Eventually, it should be configurable whether to use the byte[] caching
> > implementation or not, as the perfomance of memory allocation may vary
> > greatly depending on VM and OS implementations.
>
> Now we use ANT this is extremely easy to do. Also, I have made some changes, in
> that your supplied classes have moved to a new package org.postgresql.core, and
> extend an interface ObjectPool. I did this so that it would be easier to change
> the implementations without having to hack the main code too much.
>
> Although your patch is in there, I've disabled the part that frees the arrays
> (as that was the bit causing problems). Hopefully...
>
> >
> > If you go back to the October archives of pgsql-general you will find a
> > pointer to my second shot at an implementation - this one fix your issue
> > 1)
> > but not the others.
> >
> > I would like to see what you have been working on as well, so we can
> > come up with the best of breeds solution.
>
> In cvs as of yesterday...
>
> Peter
>
> --
> Peter Mount peter(at)retep(dot)org(dot)uk
> PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
> RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message David Schweikert 2001-01-24 14:15:18 [ANNOUNCE] Gedafe (the Generic Database Front-End) 1.0.0
Previous Message Bruce Momjian 2001-01-24 13:52:13 Re: PgAccess - small bug?

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2001-01-24 14:18:01 Re: [PATCHES] Re: Patch for JDBC timestamp problems
Previous Message Bruce Momjian 2001-01-24 13:53:15 Re: unixODBC again :-(