The application connects to Postgres as the database owner role, which is a superuser, and every connection arrives with an empty application_name. A compromise anywhere in the app therefore owns the cluster, and the activity view cannot tell which service a connection belongs to.
Wanted: a runtime role with least privilege (table and sequence grants) and a separate migration role that owns schema changes and runs the migrations; per-service application_name on every connection pool; and a login path that never needs superuser for normal work.
Done when: the services connect as a non-superuser role, migrations still apply under a role that is not the runtime role, pg_stat_activity names the service for every connection, and a fresh install provisions both roles.
The application connects to Postgres as the database owner role, which is a superuser, and every connection arrives with an empty `application_name`. A compromise anywhere in the app therefore owns the cluster, and the activity view cannot tell which service a connection belongs to.
Wanted: a runtime role with least privilege (table and sequence grants) and a separate migration role that owns schema changes and runs the migrations; per-service `application_name` on every connection pool; and a login path that never needs superuser for normal work.
Done when: the services connect as a non-superuser role, migrations still apply under a role that is not the runtime role, `pg_stat_activity` names the service for every connection, and a fresh install provisions both roles.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The application connects to Postgres as the database owner role, which is a superuser, and every connection arrives with an empty
application_name. A compromise anywhere in the app therefore owns the cluster, and the activity view cannot tell which service a connection belongs to.Wanted: a runtime role with least privilege (table and sequence grants) and a separate migration role that owns schema changes and runs the migrations; per-service
application_nameon every connection pool; and a login path that never needs superuser for normal work.Done when: the services connect as a non-superuser role, migrations still apply under a role that is not the runtime role,
pg_stat_activitynames the service for every connection, and a fresh install provisions both roles.