Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group