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

Local replay lag #17

Open
film42 opened this issue Nov 26, 2020 · 0 comments
Open

Local replay lag #17

film42 opened this issue Nov 26, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@film42
Copy link
Owner

film42 commented Nov 26, 2020

postgres=# select (pg_last_wal_receive_lsn() - pg_last_wal_replay_lsn()) / 1024^3 as lag_in_gb;
     lag_in_gb      
--------------------
 10.330981984734535
(1 row)

I wonder if we can use something like ^^ to capture the local replay lag. This might be useful if a replica was restarted with replay lag. The replication slot will remain inactive until the local replay has caught up (I think that's right). Adding a local replay lag to the json response could be nice.

@film42 film42 added the enhancement New feature or request label Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant