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

Allow setting DISABLE_SERVER_SIDE_CURSORS for PostgreSQL configurations #4014

Closed
thegcat opened this issue Mar 26, 2024 · 3 comments · Fixed by #4016
Closed

Allow setting DISABLE_SERVER_SIDE_CURSORS for PostgreSQL configurations #4014

thegcat opened this issue Mar 26, 2024 · 3 comments · Fixed by #4016

Comments

@thegcat
Copy link
Contributor

thegcat commented Mar 26, 2024

Problem and impact

We use Pretix with a PostgreSQL server and a PGBouncer in-between. We observe for example exports (in this case an Excel export) breaking on db cursor errors.

We are currently testing if passing DISABLE_SERVER_SIDE_CURSORS solves the problem, it is however currently not possible to pass this to Pretix in the pretix.cfg file or (as far as we were able to determine) via an environment variable or equivalent.

Would adding an option for this be possible if the problem is solved with this db setting?

Expected behaviour

All exports work even when using PGBouncer.

Steps to reproduce

No response

Screenshots

No response

Link

No response

Browser (software, desktop or mobile?) and version

No response

Operating system, dependency versions

No response

Version

No response

@raphaelm
Copy link
Member

I'm hesitant – yes, not much of an effort and easily doable, on the other hand there's so much more that could break on pgBouncer and I'm not sure we want to go down that route :\

@thegcat
Copy link
Contributor Author

thegcat commented Mar 26, 2024

I'm guessing except if you explicitly use PostgreSQL features that wouldn't work with transaction mode (cursors, prepared statements mostly) it should work, and it seems for now at least that we didn't encounter any problems except in that instance where Django/psycopg2 transparently uses cursors for you.

We'd be fine with a requirement for session pooling though if that's the official stance. Too bad for the extra resources we'd have to permanently allocate to Pretix instead of having them be distributed with the other apps using the DB, but nothing we can't handle.

@raphaelm
Copy link
Member

Yeah. Would you be willing to create PR with the config flag?

thegcat added a commit to thegcat/pretix that referenced this issue Mar 27, 2024
thegcat added a commit to thegcat/pretix that referenced this issue Mar 27, 2024
thegcat added a commit to thegcat/pretix that referenced this issue Apr 2, 2024
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

Successfully merging a pull request may close this issue.

2 participants