-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
Document issues with PgBouncer and session-level Advisory Locks #52
Comments
We don't use PgBouncer, but we probably should be. I wouldn't want to preclude it as an option, at any rate. It would be helpful to understand the constraints more, and whether they are a necessary aspect of GoodJob or more incidental. From the article you linked:
So maybe GoodJob isn't completely incompatible with PgBouncer? |
I have a bit of a blind spot about PgBouncer because I don't use it on any projects. But my understanding is that the default and most-beneficial mode is transaction-based pooling. Heroku's new platform pooling feature is transaction based too. Why is GoodJob currently incompatible with transaction-based connection pooling? GoodJob currently uses a session-based advisory-lock that persists for the duration of the job execution. I think there are two clear paths for PgBouncer compatibility, each of which have their downsides:
|
The third option is to allow Rails to use |
GoodJob now supports setting |
Reference: https://www.samu.space/distributed-locking-with-postgres-advisory-locks/#types-of-advisory-locks
Also, consider offering option of transaction-level advisory lock.
Why use PgBouncer:
The text was updated successfully, but these errors were encountered: