You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(postgres): tag connections with application_name
Set application_name on every Postgres connection so each session is
identifiable in pg_stat_activity. No behaviour change.
Naming:
- Shared Knex pool: odota-<APP_NAME>
- runReliableQueue dedicated Client: odota-<APP_NAME>-queue
- Explorer readonly Pool: odota-<APP_NAME>-explorer
- archivePostgresStream Client: odota-<APP_NAME>-archive
APP_NAME is set per process by ecosystem.config.js (e.g. inserter,
scanner, web, parser); falls back to "unknown" when run outside PM2.
With ~30 backend roles plus a clustered web role, this makes it possible
to answer "which service is holding connections?" with a single query:
SELECT application_name, state, count(*)
FROM pg_stat_activity
GROUP BY 1, 2 ORDER BY 3 DESC;
Co-authored-by: Cursor <cursoragent@cursor.com>
0 commit comments