From: | PG User <pguser1982(at)gmail(dot)com> |
---|---|
To: | "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org> |
Subject: | Communication error while getting a tuple |
Date: | 2014-04-02 04:13:02 |
Message-ID: | CAB7tN8ajYz_qQ3WbM3g1ZVQR5NL5699CnpyQ4p8YL=wb_FNokQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
Hi All,
I am connecting to postgres cluster using ODBC postgres driver and I am
getting error as
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.
Thanking you.
- pguser
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2014-04-02 04:38:47 | Re: Communication error while getting a tuple |
Previous Message | Michael Paquier | 2014-04-01 11:00:31 | Re: Removing support for < 7.4 servers |