]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- [bug] Added 'terminating connection' to the list
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 25 Sep 2012 20:54:50 +0000 (16:54 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 25 Sep 2012 20:54:50 +0000 (16:54 -0400)
    of messages we use to detect a disconnect with PG, which
    appears to be present in some versions when the server
    is restarted.  [ticket:2570]

CHANGES
lib/sqlalchemy/dialects/postgresql/psycopg2.py

diff --git a/CHANGES b/CHANGES
index 2dab1c0189b6e696e32d11821ad73302044ab49f..289876b074231c56f744b46a0b2710f4efbe2fae 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -172,6 +172,11 @@ CHANGES
     orders them.  Courtesy Gunnlaugur Þór Briem.
     [ticket:2531].
 
+  - [bug] Added 'terminating connection' to the list
+    of messages we use to detect a disconnect with PG, which
+    appears to be present in some versions when the server
+    is restarted.  [ticket:2570]
+
 - mysql
   - [bug] Updated mysqlconnector interface to use
     updated "client flag" and "charset" APIs,
index f9f992d04bab8b13ce80b4e6f79b86efe1d6ff27..7fc66b174630cd9d8f9997b94b8f144c940b0378 100644 (file)
@@ -372,7 +372,8 @@ class PGDialect_psycopg2(PGDialect):
             # these error messages from libpq: interfaces/libpq/fe-misc.c.
             # TODO: these are sent through gettext in libpq and we can't
             # check within other locales - consider using connection.closed
-            return 'closed the connection' in str(e) or \
+            return 'terminating connection' in str(e) or \
+                    'closed the connection' in str(e) or \
                     'connection not open' in str(e) or \
                     'could not receive data from server' in str(e)
         elif isinstance(e, self.dbapi.InterfaceError):