Skip to content

Properly discover a connection is closed in postgresql_adapter #6477

Merged
merged 1 commit into from May 30, 2012

3 participants

@steveklabnik
Ruby on Rails member

PQstatus doesn't properly test if future operations will succeed. A
PQping function is added to libpq in PostgreSQL 9.1, but if we rely
on it, everyone on earlier versions of Postgres is out of luck,
and the pg gem wouldn't have the 'fix' until the next release.

Thanks to @cbrecabarren and @ged for handling all the dirty details.

Closes #3392.

/cc @tenderlove @jonleighton

@steveklabnik steveklabnik Properly discover a connection is closed in postgresql_adapter
PQstatus doesn't properly test if future operations will succeed. A
PQping function is added to libpq in PostgreSQL 9.1, but if we rely
on it, everyone on earlier versions of Postgres is out of luck,
and the pg gem wouldn't have the 'fix' until the next release.

Thanks to @cbrecabarren and @ged for handling all the dirty details.

Closes #3392.
4dacac3
@rafaelfranca rafaelfranca merged commit c56ef67 into rails:master May 30, 2012
@ghazel
ghazel commented on 4dacac3 Oct 17, 2012

Why @connection.query instead of @connection.async_exec?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.