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

fix(monitoring): improve accuracy of replica lag #2744

Merged
merged 2 commits into from
Sep 12, 2023
Merged

fix(monitoring): improve accuracy of replica lag #2744

merged 2 commits into from
Sep 12, 2023

Conversation

gbartolini
Copy link
Contributor

@gbartolini gbartolini commented Sep 12, 2023

Fix the pg_replication metric to use the pg_last_wal_receive_lsn() and pg_last_wal_replay_lsn() functions to better estimate the lag of a replica, and avoid the increase of the lag on inactive systems.

Closes #1814

@github-actions
Copy link
Contributor

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions github-actions bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.19 release-1.20 labels Sep 12, 2023
@github-actions
Copy link
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

@github-actions
Copy link
Contributor

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Fix the `pg_replication` metric to use the `pg_last_wal_receive_lsn()`
and `pg_last_wal_replay_lsn()` functions to better estimate the lag
of a replica, and avoid the increase of the lag on inactive systems.

Closes #1814

Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
@github-actions
Copy link
Contributor

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@leonardoce
Copy link
Contributor

/ok-to-merge

@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Sep 12, 2023
@github-actions
Copy link
Contributor

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@leonardoce leonardoce merged commit 081f7e3 into main Sep 12, 2023
15 of 18 checks passed
@leonardoce leonardoce deleted the dev/1814 branch September 12, 2023 15:30
cnpg-bot pushed a commit that referenced this pull request Sep 12, 2023
Fix the `pg_replication` metric to use the `pg_last_wal_receive_lsn()`
and `pg_last_wal_replay_lsn()` functions to better estimate the lag
of a replica, and avoid the increase of the lag on inactive systems.

Closes #1814

Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
(cherry picked from commit 081f7e3)
mnencia pushed a commit that referenced this pull request Sep 13, 2023
Fix the `pg_replication` metric to use the `pg_last_wal_receive_lsn()`
and `pg_last_wal_replay_lsn()` functions to better estimate the lag
of a replica, and avoid the increase of the lag on inactive systems.

Closes #1814

Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-requested ◀️ This pull request should be backported to all supported releases ok to merge 👌 This PR can be merged release-1.19 release-1.20
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replication lag metric seems to be broken in 1.19.1
4 participants