Thread: Cannot remove prepared statement.

Cannot remove prepared statement.

From
Darryl Pye
Date:

Hi, 

I am having some problems with prepared statements.

Somehow I have 2  orphan prepared statements in one of my databases.

I have tried Deallocate All and  Discard All,  no joy.

If  I try to change the table structures that where involved in the prepared statements or any of its inherited tables then the session crashes.
I am using partitioned constraints on this table. tried turning off  in conf didn't help

If  I restore from backup the session crashes
I cannot delete the database as it says there are prepared statements.

I have restarted  postgres,  tried to set prepared statements back to 0  but then postgres will not start.
Logs tell me to Set max_prepared_transactions to a nonzero value.

Rebooted server many times.
All other databases work fine.
I am using 8.4


"doc, you gotta help us, man - we've tried nothing and were all out of ideas"



Regards,
Darryl






Find your next place with Ninemsn property Looking for a place to rent, share or buy?

Re: Cannot remove prepared statement.

From
Tom Lane
Date:
Darryl Pye <darrylpye@hotmail.com> writes:
> I am having some problems with prepared statements.
> Somehow I have 2  orphan prepared statements in one of my databases.

I think you are confusing prepared statements with prepared
transactions.

> I have tried Deallocate All and  Discard All,  no joy.

ROLLBACK PREPARED is probably the command you're looking for.

            regards, tom lane