-
Notifications
You must be signed in to change notification settings - Fork 31
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
Prepared statement SELECT * FROM pg_catalog.<any_non_empty_table> with setFetchSize gives ERROR: portal "c_2-4858445154544" does not exist #9
Comments
Thanks for reporting issue. Let me explain minor difference in 1.x and 2.x driver. 1.x driver doesn't send Fetch size to server. 2.x sends fetch size to server. So it uses server side cursor as wells as client side cursor. In 2.x default client side cursor is based on fetchRingBufferSize i.e. actual memory usage instead of number of rows. This is by default 1GB. Now when 2.x driver sends fetch size to server, in query on PG tables something wrong happens in the query execution or server side cursor. That's why we see the "cursor closed" error. So I suggest to set fetch size to 0 and control rows memory using fetchRingBufferSize, We will update you when issue resolved in the server side. |
For our internal reference id: RedshiftDP-28917 |
@iggarish, thank you for the explanation! |
@iggarish, I have a question about |
fetchRingBufferSize is based on size of rowset. If you set fetch size with this option, it passes fetch size value to server and it sends those many rows to client. The driver fetches upto size of fetchRingBufferSize only. So which ever is lesser size application gets that as a batch. Same way next batch will fetch when application reads more rows. Basically all these are to limit client side memory usage. |
@iggarish,
In both this cases |
Yes. But because you got server side issue when you set fetchSize != 0, it's better to set 0 right now as a work around until server get fix. |
Thank you. We don't use prepared statements for users' requests so I think fetchSize in this case should be fine |
We fix the issue and fix will be available in next release. |
We just released 2.0.0.3. Please try it and let us know. |
@iggarish, I confirm that the issue is fixed. Thanks! |
Driver version
2.0.0.2
Works fine with
1.2.41.1065
Redshift version
PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.22575
Client Operating System
MacOS
JAVA/JVM version
1.8
Problem description
Actual output:
Expected output:
pg_catalog
Statement
works finePreparedStatement
without fetch size works fineWhy this is important:
This problem occurs in DataGrip when a user introspects
pg_catalog
(and maybe other relatively big schemas). He/she may get incorrect schema ofpg_catalog
The text was updated successfully, but these errors were encountered: