Re: autovacuum locks

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Gregg Jaskiewicz" <gryzman(at)gmail(dot)com>, "Pg Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: autovacuum locks
Date: 2012-03-02 16:05:38
Message-ID: 4F509B720200002500045E40@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2012-03-02 16:41:05 Re: ECPG FETCH readahead
Previous Message Tom Lane 2012-03-02 15:36:59 Re: autovacuum locks