Description: 'Communication error while getting a tuple;
Error fetching next row'
SQLState: 08S01(SQLSTATE_COMMUNICATION_LINK_FAILURE)
What can be possible reason for the same?
I am using the following script to get the tuples:
import pyodbc
cnxn = pyodbc.connect('DRIVER={PostgreSQL UNICODE};SERVER=hostname;DATABASE=testdb;PORT=port;UID=test;PWD=password;UseDeclareFetch=1;Fetch=999;sslmode=prefer')
cursor = cnxn.cursor() cursor.execute(sql) ressize=0 while(True): rows=cursor.fetchmany(999)
sz=len(rows) ressize=ressize+sz
if sz == 0: break; print "read =" + str(ressize)
The result size for a query is huge around 10M rows.
pgsql-odbc by date:
Соглашаюсь с условиями обработки персональных данных