-
Notifications
You must be signed in to change notification settings - Fork 34
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
wip: pgbouncer #615
Conversation
docker/pgbouncer/pgbouncer.ini
Outdated
;; session - after client disconnects (default) | ||
;; transaction - after transaction finishes | ||
;; statement - after statement finishes | ||
pool_mode = session |
There was a problem hiding this comment.
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
c1e1e73
to
2b7bc4a
Compare
@@ -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): |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Nice article to read: https://www.depesz.com/2012/12/02/what-is-the-point-of-bouncing/