Re: BUG #3800: Java/Postgres PreparedStatement returns stale data - Mailing list pgsql-bugs

From Kris Jurka
Subject Re: BUG #3800: Java/Postgres PreparedStatement returns stale data
Date
Msg-id Pine.BSO.4.64.0712052313360.26346@leary.csoft.net
Whole thread Raw
In response to BUG #3800: Java/Postgres PreparedStatement returns stale data  ("Michael Han" <michael.han@ngc.com>)
List 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

pgsql-bugs by date:

Previous
From: "Reece Hart"
Date:
Subject: BUG #3801: max_fsm_pages postgresql.conf default != guc.c default
Next
From: Kris Jurka
Date:
Subject: Re: BUG #3801: max_fsm_pages postgresql.conf default != guc.c default