Re: ERROR: cached plan must not change

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: CISS Moussa <Moussa(dot)CISS(at)choregie(dot)fr>
Cc: List <pgsql-jdbc(at)postgresql(dot)org>, "Archi(dot)Donnees_Tours" <Archi(dot)Donnees_Tours(at)choregie(dot)fr>
Subject: Re: ERROR: cached plan must not change
Date: 2013-09-30 13:24:12
Message-ID: CADK3HHK0=uiiTd5uka-qyLMKcyJ0+cmkvOPmM8B+qJNA=LejMg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,

I would think this is an application problem. You need to catch the
exception and close the prepared statement, and reopen it.

Currently the backend caches prepared statements to speed things up for
future queries. If you change the table definition, the server has little
recourse but to throw an error.

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

2013/9/30 CISS Moussa <Moussa(dot)CISS(at)choregie(dot)fr>

> Hi,
>
>
>
> We are facing an error in our java application: “ERROR: cached plan must
> not change”
>
> Our application architecture is as follows:
>
>
>
> WAS >> hibernate >> applications >> java connection pool >> drivers jdbc
> (postgresql-9.1-901.jdbc4.jar) >> cluster postgresql 9.1.2 or 9.2.4
>
>
>
> This error occurs when changing a table definition and the application is
> in use.
>
> Actually, one of the solutions we have is to kill existing “WAS”
> connections so that future SQL requests do not fail into this error.
>
>
>
> So we need your help to resolve this error :
>
> - Have you in jdbc driver some setting which can handle this problem?
> - Is this error handled in future jdbc driver ?
>
>
>
>
>
> Cordialement/Best Regards
>
> * *
>
> *CISS Moussa*
>
> **
>
> *Architecture Bases De Données*
>
> *CHOREGIE CNE – TOURS*
>
> *(**:** 02.47.85.81.59*
>
> 41 Rue Bonne Nouvelle – 37100 Tours
>
>
>
>
> ----------------------------------------- Le présent message (y compris
> tous les éléments attachés) est confidentiel et destiné aux seules
> personnes qu'il vise. Si vous l'avez reçu par erreur, merci de l'indiquer à
> son expéditeur par retour et de procéder à sa destruction dans vos
> systèmes. Toute utilisation ou diffusion non autorisée de son contenu, dans
> sa totalité ou en partie, est strictement interdite. Merci de noter que les
> e-mails sont susceptibles d'être altérés. CHOREGIE ne saurait être tenu
> pour responsable ni de la transmission erronée ou incomplète des
> informations contenues dans ce message, ni des délais de réception ou des
> dommages causés à votre système. CHOREGIE ne garantit ni que l'intégrité de
> la communication ait été maintenue ni que cette transmission soit exempte
> de virus, d'interceptions ou d'interférences.
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Adib Saikali 2013-09-30 13:32:17 Status of 9.3 JDBC Driver?
Previous Message CISS Moussa 2013-09-30 10:03:34 ERROR: cached plan must not change