goauthentik / goauthentik/authentik
Session-scoped Postgres advisory locks break under transaction pooling
- Dominant language
- Python
- Stars
- 25.6k
- Forks
- 2k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 634
Description
## What
Same root: session-scoped Postgres advisory locks break under transaction-pooling (PgBouncer / Cockroach). #14562 asks for a disable flag; #23876 is the migrate.py deadlock.
## Want
- #14562 asks for a disable flag
- #23876 is the migrate.py deadlock
## Ideas this came from
- [#14562 Flag to disable advisory locks](https://github.com/goauthentik/authentik/issues/14562) — It has been raised once before here but it has been quite a while since it was closed. The ability to use CockroachDB as the database would really help. The sca
- [#23876 Migration advisory lock (session-scoped pg_advisory_lock) strands under PgBouncer transaction pooling, deadlocking all server pods](https://github.com/goauthentik/authentik/issues/23876) — lifecycle/migrate.py guards migrations with a session-level advisory lock: Behind a PgBouncer pool in transaction mode this lock leaks and is never released, pe
Contributor guide
Research direction
Start with lifecycle/migrate.py and read linked issues #14562 and #23876 to understand the existing advisory-lock behavior and the requested disable or pooling-related outcome. The issue does not define a single implementation or acceptance test, so confirm the intended scope and what supporting CockroachDB or transaction pooling should mean before assessing completion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100