Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loop when result size exceeds Cursor.itersize #26

Open
lopuhin opened this issue Sep 21, 2012 · 0 comments
Open

Infinite loop when result size exceeds Cursor.itersize #26

lopuhin opened this issue Sep 21, 2012 · 0 comments

Comments

@lopuhin
Copy link

lopuhin commented Sep 21, 2012

If the number of results the query returns is greater than Cursor.itersize (currently 2000), the call to cursor.iter never returns. If I make it large, say 100000, the call finishes ok.
Traceback:

File "/home/kostia/chtd/netdb_test/netdb_test/pypy-env/src/netdb/netdb/stitcher.py", line 306, in __iter__
    for row in cursor :
File "/home/kostia/chtd/netdb_test/netdb_test/pypy-env/site-packages/psycopg2ct/_impl/cursor.py", line 550, in __iter__
    rows = self.fetchmany(self.itersize)
File "/home/kostia/chtd/netdb_test/netdb_test/pypy-env/site-packages/psycopg2ct/_impl/cursor.py", line 22, in check_closed_
    return func(self, *args, **kwargs)
File "/home/kostia/chtd/netdb_test/netdb_test/pypy-env/site-packages/psycopg2ct/_impl/cursor.py", line 35, in check_no_tuples_
    return func(self, *args, **kwargs)
File "/home/kostia/chtd/netdb_test/netdb_test/pypy-env/site-packages/psycopg2ct/_impl/cursor.py", line 336, in fetchmany
    rows.append(self._build_row(self._rownumber))
File "/home/kostia/chtd/netdb_test/netdb_test/pypy-env/site-packages/psycopg2ct/_impl/cursor.py", line 821, in _build_row
    for i in xrange(n):
KeyboardInterrupt

If the issue is not obvious from this description, I can make a test for it, or try to fix it myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant