Re: autovacuum locks - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: autovacuum locks
Date
Msg-id 4F509B720200002500045E40@gw.wicourts.gov
Whole thread Raw
In response to Re: autovacuum locks  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: autovacuum locks
Next
From: Noah Misch
Date:
Subject: Re: ECPG FETCH readahead