-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
should we disable server side cursor for redshift connection by default? #22
Comments
@shimizukawa What is the downside of having server-side cursors on Redshift? It has a serious advantage for large querysets on PostgreSQL. |
@emyller Redshift documentation recommends against using sever side cursors. |
For what it's worth, not really sure.... I just started working on a dashboard for a redshift project and am prototyping with rails and django. The DISABLE_SERVER_SIDE_CURSORS = True setting got me past a “cursor ”django_curs*" does not exist” error. I was getting that error on a ForeignKey association in admin and in a filtered list view I was building |
me again, even with DISABLE_SERVER_SIDE_CURSORS = True i'm seeing the exception in django_admin for a model with a site = models.ForeignKey(Site..) when navigating to the edit page. I am setting the PK and FK in the redshift schema for documentation and query optimization. Is anyone else seeing this? |
I just ran into this issue which setting I received the following error when rendering a bound form (i.e. re-displaying a populated form) that had a ModelMultipleChoiceField pointing to a model utilizing Redshift (note that an unbound, blank form rendered with no issue):
Strangely, googling that quoted phrase returns no results which made troubleshooting difficult. This error is thrown during the handling of the above exception while trying to close the cursor:
I'm not using the admin for any of my models in Redshift, but I tried registering and testing one and it seemed to work okay regardless of the setting of |
DISABLE_SERVER_SIDE_CURSORS does work, as you know. I started having the issues when I added another db connection and had to move that setting to the specific redshift connection. Thanks |
PostgreSQL driver use server side cursor by default since django-1.11.
https://docs.djangoproject.com/en/1.11/ref/databases/#server-side-cursors
Should we set
DISABLE_SERVER_SIDE_CURSORS = True
?The text was updated successfully, but these errors were encountered: