Re: BUG #3800: Java/Postgres PreparedStatement returns stale data

From: Kris Jurka <books(at)ejurka(dot)com>
To: Michael Han <michael(dot)han(at)ngc(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3800: Java/Postgres PreparedStatement returns stale data
Date: 2007-12-06 04:17:36
Message-ID: Pine.BSO.4.64.0712052313360.26346@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, 5 Dec 2007, Michael Han wrote:

> The following bug has been logged online:
>
> Bug reference: 3800
> PostgreSQL version: 8.2
> Description: Java/Postgres PreparedStatement returns stale data
> Details:
>
> PROBLEM : Java/Postgres Returns Stale data when underlying Table View is
> Replaced

Prior to the 8.3 release, prepared plans don't notice when underlying
objects change. Aside from waiting for 8.3, the only workaround is to
prevent the JDBC driver from reusing the same server plan. By default
the JDBC driver reuses the server plan after the 5th execution, and you
can adjust this by the prepareThreshold URL parameter. You can disable
plan reuse by adding prepareThreshold=0.

Kris Jurka

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Kris Jurka 2007-12-06 04:20:00 Re: BUG #3801: max_fsm_pages postgresql.conf default != guc.c default
Previous Message Reece Hart 2007-12-06 03:58:10 BUG #3801: max_fsm_pages postgresql.conf default != guc.c default