You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While asynchronously connecting to database, exception that indicates wrong poll state is thrown.
PGDATESTYLE env variable is set to "sql, mdy" which is correct value according to postgres documentation (8.5.2 of https://www.postgresql.org/docs/9.5/datatype-datetime.html).
It seems like this is the source of the problem. When PGDATESTYLE is set to "iso, mdy" psycopg2cffi works correctly.
test.py tries to connect (async) to database and execute "SELECT 1" on it.
[root@host121 pgtest]# (export PGDATESTYLE='iso, mdy'; pypy3 test.py )
start
wait connect
wait select
[(1,)]
[root@host121 pgtest]# (export PGDATESTYLE='sql, mdy'; pypy3 test.py )
start
wait connect
bad state from poll: 3
The exception throw is:
<class 'psycopg2cffi._impl.exceptions.OperationalError'>
Traceback (most recent call last):
File "test.py", line 19, in <module>
wait_select(aconn)
File "/usr/local/pypy3/site-packages/psycopg2cffi-2.8.1-py3.6-linux-x86_64.egg/psycopg2cffi/extras.py", line 607, in wait_select
raise conn.OperationalError("bad state from poll: %s" % state)
psycopg2cffi._impl.exceptions.OperationalError: bad state from poll: 3
While using normal psycopg2 implementation connection works as expected.
Let me know if I can provide more details.
MR
The text was updated successfully, but these errors were encountered:
While asynchronously connecting to database, exception that indicates wrong poll state is thrown.
PGDATESTYLE env variable is set to "sql, mdy" which is correct value according to postgres documentation (8.5.2 of https://www.postgresql.org/docs/9.5/datatype-datetime.html).
It seems like this is the source of the problem. When PGDATESTYLE is set to "iso, mdy" psycopg2cffi works correctly.
test.py tries to connect (async) to database and execute "SELECT 1" on it.
The exception throw is:
While using normal psycopg2 implementation connection works as expected.
Let me know if I can provide more details.
MR
The text was updated successfully, but these errors were encountered: