sqitchers / sqitch

Sensible database change management

Home Page:https://sqitch.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Preapred statement does not exists when deploying to postgres

dgiddins opened this issue · comments

I'm getting the following error while trying to deploy changes to our test and production servers.

Could not deallocate
[14:43:21 ](https://teamcity.otenv.com/buildConfiguration/LocationsTeam_LocationsV5_LocationReadSchema_2bDeployToPpRs/20979384?buildTab=log&focusLine=111&logView=flowAware&linesState=111)         ERROR: 7 "ERROR:  prepared statement "dbdpg_p1_1" does not exist" (err#0)

This might be related to and upgrade to postgres 13, but seems unlikley as this error started happening some time after the upgrade.

If you need more info on setup, please list what is missing from this post and I will gather what is needed to debug this.

Are you using pgBouncer or another proxy server? Good way to lose prepared statements.

I believe we might be, much of the detail of our deployment is hidden away from us. It does sometimes, very infrequently work which isn't helping either. Is there a way to bypass pgbouncer?

So it seems switching from port 6543 to 5432 fixed the issue

Yeah, if you can connect to the port that Postgres is actually listening on. The other thing to do is to change this line to pass 0 instead of 1. There ought to be a way to turn it on or off in the connection string, though…

Alas, there is no connection parameter for enabling or disabling server side prepares :-(