Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres: Do not attempt to deallocate a statement if the connection is no longer active. #3258

Merged
merged 1 commit into from
Oct 20, 2011

Conversation

ileitch
Copy link

@ileitch ileitch commented Oct 8, 2011

The PostgreSQL adapter attempts to clear out the statement cache on reconnect!, which in turn issues a DEALLOCATE query for each cached statement. If the connection has been lost, the query results in an PGError being raised.

This change first checks the connection is OK before attempting to DEALLOCATE the statement.

Fixes issue #3160

tenderlove added a commit that referenced this pull request Oct 20, 2011
Postgres: Do not attempt to deallocate a statement if the connection is no longer active.
@tenderlove tenderlove merged commit 88ac481 into rails:3-1-stable Oct 20, 2011
tenderlove added a commit that referenced this pull request Oct 20, 2011
Postgres: Do not attempt to deallocate a statement if the connection is no longer active.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants