{% load i18n %}
{% trans "readiness ยท WAL position ยท standbys ยท slots" %}
{% trans "โ Already configured to accept a standby." %}
{% else %}{% trans "Set these on the primary, then restart it (each needs a full restart):" %}
{% blocktrans with name=recipe.slot_name %}Reusing the existing physical slot {{ name }}.{% endblocktrans %}
{% else %}{% blocktrans with name=recipe.slot_name %}No physical slot yet โ create {{ name }} (so the primary keeps WAL for the standby):{% endblocktrans %}
{{ recipe.create_slot_sql }}
{% trans "Run this on the new standby (an empty data dir). -R writes its standby config for you:" %}
{{ recipe.basebackup_cmd }}
{% trans "primary_conninfo it will write:" %} {{ recipe.primary_conninfo }}
{% blocktrans with host=recipe.primary_host port=recipe.primary_port %}โ The standby must be able to reach {{ host }}:{{ port }} over the network, and authenticate โ set the password via PGPASSWORD or ~/.pgpass (never in the config). This is a starting point; see your platform's docs for production (TLS, auth).{% endblocktrans %}
| PID | {% trans "Client" %} | {% trans "State" %} | {% trans "Sync" %} | {% trans "Lag" %} | {% trans "Replay lag" %} |
|---|---|---|---|---|---|
| {{ s.pid }} | {{ s.app|default:"โ" }} {{ s.client|default:"" }} | {{ s.state|default:"โ" }} | {{ s.sync_state|default:"โ" }} | {% if s.lag_bytes is not None %}{{ s.lag_bytes }} B{% else %}โ{% endif %} | {{ s.replay_lag_human|default:"โ" }} |
{% trans "No standby connected." %}
{% endif %}| {% trans "Name" %} | {% trans "Type" %} | {% trans "Active" %} | {% trans "Restart LSN" %} | {% trans "Retained WAL" %} | {% trans "Actions" %} |
|---|---|---|---|---|---|
| {{ sl.name }} | {{ sl.slot_type }}{% if sl.database %} {{ sl.database }}{% endif %} | {% if sl.active %} {% trans "active" %} {% else %} {% trans "inactive ยท pins WAL" %} {% endif %} {% if sl.wal_status and sl.wal_status != 'reserved' %} {{ sl.wal_status }} {% endif %} | {{ sl.restart_lsn|default:"โ" }} | {% if sl.retained_bytes is not None %}{{ sl.retained_bytes|filesizeformat }}{% else %}โ{% endif %} |
{% trans "No replication slots." %}
{% endif %}