PostgreSQL version: PostgreSQL 10.6 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit
Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
the issue with a local PostgreSQL install?: Local
Python version: 3.11
Platform: Linux
Do you use pgbouncer?: No
Did you install asyncpg with pip?: Yes
If you built asyncpg locally, which version of Cython did you use?: N/A
Can the issue be reproduced under both asyncio and
uvloop?: Yes
According to the README Postgres 9.5 and up are supported, but I'm unable to fetch data from a Postgres 10.6 DB.
The following code just hangs forever against 10.6. The only other Postgres version I could test was 15 and the code runs without issues.
Killing it with ctrl+c consistently gives the following stacktrace:
File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/base_events.py", line 650, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/test.py", line 7, in run
values = await conn.fetch(
^^^^^^^^^^^^^^^^^
File "/python3.11/site-packages/asyncpg/connection.py", line 620, in fetch
return await self._execute(
^^^^^^^^^^^^^^^^^^^^
File "/python3.11/site-packages/asyncpg/connection.py", line 1658, in _execute
result, _ = await self.__execute(
^^^^^^^^^^^^^^^^^^^^^
File "/python3.11/site-packages/asyncpg/connection.py", line 1683, in __execute
return await self._do_execute(
^^^^^^^^^^^^^^^^^^^^^^^
File "/python3.11/site-packages/asyncpg/connection.py", line 1710, in _do_execute
stmt = await self._get_statement(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python3.11/site-packages/asyncpg/connection.py", line 397, in _get_statement
statement = await self._protocol.prepare(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "asyncpg/protocol/protocol.pyx", line 168, in prepare
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/test.py", line 13, in <module>
asyncio.run(run())
File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/runners.py", line 123, in run
raise KeyboardInterrupt()
KeyboardInterrupt
If it's not a general issue with Postgres 10 are there any DB settings known to interfere with asyncpg that I could check?
According to the README Postgres 9.5 and up are supported, but I'm unable to fetch data from a Postgres 10.6 DB. The following code just hangs forever against 10.6. The only other Postgres version I could test was 15 and the code runs without issues.
Killing it with ctrl+c consistently gives the following stacktrace:
If it's not a general issue with Postgres 10 are there any DB settings known to interfere with asyncpg that I could check?