Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> So the real problem is slow removal of prepared transactions,
> which most likely is an application logic problem. It's certainly
> not autovac's fault.
Yeah, I've seen way too much Java code lately which fails to close
ResultSet or Statement (which includes PreparedStatement) objects,
leaving it to the vagaries of the Java garbage collector to close
these objects right before freeing their memory to the Java heap.
People should never count on the finalize() method to do this for
them -- the close() method should be invoked as soon as the object
is no longer needed, and definitely before it goes out of scope.
-Kevin