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

wip: pgbouncer #615

Merged
merged 1 commit into from
Nov 20, 2023
Merged

wip: pgbouncer #615

merged 1 commit into from
Nov 20, 2023

Conversation

ntarocco
Copy link
Contributor

@ntarocco ntarocco commented Oct 19, 2023

;; session - after client disconnects (default)
;; transaction - after transaction finishes
;; statement - after statement finishes
pool_mode = session
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This parameter must be checked very carefully

@ntarocco ntarocco force-pushed the pgbouncer branch 2 times, most recently from c1e1e73 to 2b7bc4a Compare October 31, 2023 16:24
@ntarocco ntarocco marked this pull request as ready for review October 31, 2023 16:25
@@ -68,8 +69,19 @@ APP_RDM_ROUTES["index"] = ("/", frontpage_view_function)
# Flask-SQLAlchemy
# ================
# See https://flask-sqlalchemy.palletsprojects.com/en/2.x/config/

SQLALCHEMY_DATABASE_URI="postgresql+psycopg2://zenodo:zenodo@localhost/zenodo"
def _parse_env_bool(var_name, default=None):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be removed when pgbouncer will be enabled by default

;; session - after client disconnects (default)
;; transaction - after transaction finishes
;; statement - after statement finishes
pool_mode = transaction
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pooler/connections settings must be reviewed carefully

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the article above it looks ok. I don't think we ever rely on sequence values across transactions (e.g. for the recid sequence of the requests number, and hopefully SQLAlchemy doesn't do any fancy tricks under the hood either.

@ntarocco ntarocco changed the title wip: pbbouncer wip: pgbouncer Oct 31, 2023
@slint slint merged commit f365916 into master Nov 20, 2023
3 checks passed
@slint slint deleted the pgbouncer branch November 20, 2023 16:58
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 this pull request may close these issues.

2 participants