Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Insatiable Postgres Replication Slot #236

Open
xluffy opened this issue Mar 12, 2024 · 0 comments
Open

The Insatiable Postgres Replication Slot #236

xluffy opened this issue Mar 12, 2024 · 0 comments

Comments

@xluffy
Copy link
Owner

xluffy commented Mar 12, 2024

SELECT
  slot_name,
  pg_size_pretty(
    pg_wal_lsn_diff(
      pg_current_wal_lsn(), restart_lsn)) AS retained_wal,
  active,
  restart_lsn FROM pg_replication_slots WHERE slot_name LIKE 'gh_%';
         slot_name          | retained_wal | active |  restart_lsn
----------------------------+--------------+--------+---------------
 gh_v2_xxx_yyy_zz  | 18 MB        | t      | 12C2/7935C538
 gh_v2_aaa_bbb_ccc | 20 MB        | t      | 12C2/790DDCE8
 gh_v2_qqq_www_rrr | 16 MB        | t      | 12C2/794C8108
(3 rows)

https://www.morling.dev/blog/insatiable-postgres-replication-slot/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant