Open
Description
Proposal
We set the option max_slot_wal_keep_size supported by postgres >= 13 and want to alert if the slot is lost. I cannot find a reliable solution to do this except using wal_status
and safe_wal_size
which is currently not exported.
documentation: https://www.postgresql.org/docs/13/view-pg-replication-slots.html
example:
postgres=# SELECT * FROM pg_catalog.pg_replication_slots;
slot_name | plugin | slot_type | datoid | database | temporary | active | active_pid | xmin | catalog_xmin | restart_lsn | confirmed_flush_lsn | wal_status | safe_wal_size
-----------+--------+-----------+--------+----------+-----------+--------+------------+------+--------------+-------------+---------------------+------------+---------------
barman | | physical | | | f | f | | | | 0/B0000000 | | unreserved | -323906992
(1 rows)
postgres=# SELECT * FROM pg_catalog.pg_replication_slots;
slot_name | plugin | slot_type | datoid | database | temporary | active | active_pid | xmin | catalog_xmin | restart_lsn | confirmed_flush_lsn | wal_status | safe_wal_size
-----------+--------+-----------+--------+----------+-----------+--------+------------+------+--------------+-------------+---------------------+------------+---------------
barman | | physical | | | f | f | | | | | | lost |
(1 rows)
Metadata
Metadata
Assignees
Labels
No labels