{% load i18n %}
pg_stat_activity {% trans "— running queries and connections" %}
{% trans "Connections" %} {% trans "— in use vs the server limit" %}
{% blocktrans with used=headroom.used max=headroom.max %}{{ used }} / {{ max }} used{% endblocktrans %} · {{ headroom.pct }}%
{% trans "Oldest snapshot in use" %} {% trans "— rows updated or deleted since then can't be vacuumed" %}
{% blocktrans with pid=xmin_holder.pid user=xmin_holder.user|default:"—" age=xmin_holder.xmin_age %}PID {{ pid }} ({{ user }}) is looking at the database as it was {{ age }} transactions ago{% endblocktrans %} · {{ xmin_holder.state|default:"—" }}
{% if xmin_holder.pins_vacuum %}{% trans "It is not running a query, so nothing needs that old view. Cancel does nothing here; ending the session lets VACUUM clean up." %}
{% endif %}| PID | {% trans "User" %} | {% trans "State" %} | {% trans "Running" %} | xmin age | {% trans "Query" %} | {% trans "Actions" %} |
|---|---|---|---|---|---|---|
| {{ s.pid }} | {{ s.user|default:"—" }} | {% if s.state == 'active' %} {% trans "active" %} {% elif s.state == 'idle in transaction' %} {% trans "idle in txn" %} {% else %} {{ s.state|default:"—" }} {% endif %} {% if s.blocked %} {% blocktrans with pids=s.blocked_by|join:", " %}blocked by {{ pids }}{% endblocktrans %} {% endif %} {% if s.wait %}{{ s.wait }}{% endif %} | {% if s.state == 'active' and s.query_secs is not None %}{{ s.query_secs }}s{% else %}—{% endif %} | {% if s.xmin_age is not None %}{{ s.xmin_age }}{% else %}—{% endif %} | {% if s.is_self %}{% trans "— cli2ui (this request) —" %}{% else %}{{ s.query|default:"—" }}{% endif %} | {% if s.is_self %} {% trans "this tool" %} {% else %} {% if s.cancellable %} {% else %} {# Not running a query: cancel would be accepted and do nothing. #} {% trans "cancel" %} {% endif %} {% endif %} |
{% trans "No client sessions" %}
{% trans "Nothing is connected to this database right now." %}
{% trans "The query behind this view" %}
{{ query_sql }}