Skip to content

Conversation

@mayankshah1607
Copy link
Member

@mayankshah1607 mayankshah1607 commented Jan 14, 2026

K8SPG-374 Powered by Pull Request Badge

CHANGE DESCRIPTION

Add support for standby lag detection.

It can be enabled by setting the .spec.standby.maxAcceptableLag field:

apiVersion: pgv2.percona.com/v2
kind: PerconaPGCluster
metadata:
  name: standby-cluster
spec:
  standby:
    enabled: true
    repoName: repo1
    maxAcceptableLag: 10Mi

maxAcceptableLag is the maximum WAL lag allowed for the standby cluster, measured in bytes of WAL data. When this value is exceeded, the cluster primary pod in the standby is marked as unready, the cluster goes into initializing state, and a StandbyLagging condition is set in the status.

NOTE: This PR adds support only for detecting lag in those standby clusters that are reading WAL archives from a pgbackrest repo. Support for streaming standby will be added in a separate PR.

CHECKLIST

Jira

  • Is the Jira ticket created and referenced properly?
  • Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
  • Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

  • Is an E2E test/test case added for the new feature/change?
  • Are unit tests added where appropriate?

Config/Logging/Testability

  • Are all needed new/changed options added to default YAML files?
  • Are all needed new/changed options added to the Helm Chart?
  • Did we add proper logging messages for operator actions?
  • Did we ensure compatibility with the previous version or cluster upgrade process?
  • Does the change support oldest and newest supported PG version?
  • Does the change support oldest and newest supported Kubernetes version?

Signed-off-by: Mayank Shah <[email protected]>
@it-percona-cla
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Signed-off-by: Mayank Shah <[email protected]>
Signed-off-by: Mayank Shah <[email protected]>
Signed-off-by: Mayank Shah <[email protected]>
Signed-off-by: Mayank Shah <[email protected]>
Signed-off-by: Mayank Shah <[email protected]>
Signed-off-by: Mayank Shah <[email protected]>
mayankshah1607 and others added 13 commits January 16, 2026 14:58
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Mayank Shah <[email protected]>
Signed-off-by: Mayank Shah <[email protected]>
Signed-off-by: Mayank Shah <[email protected]>
Signed-off-by: Mayank Shah <[email protected]>
Signed-off-by: Mayank Shah <[email protected]>
Signed-off-by: Mayank Shah <[email protected]>
@JNKPercona
Copy link
Collaborator

Test Name Result Time
backup-enable-disable passed 00:07:14
custom-envs passed 00:23:44
custom-extensions passed 00:13:56
custom-tls passed 00:06:13
database-init-sql passed 00:02:35
demand-backup passed 00:23:51
finalizers passed 00:04:20
init-deploy passed 00:02:54
monitoring passed 00:08:37
monitoring-pmm3 passed 00:09:49
one-pod passed 00:06:04
operator-self-healing passed 00:09:42
pgvector-extension passed 00:03:00
pitr passed 00:11:44
scaling passed 00:05:08
scheduled-backup passed 00:24:13
self-healing passed 00:08:45
sidecars passed 00:02:37
standby-pgbackrest passed 00:13:21
start-from-backup passed 00:10:30
tablespaces passed 00:07:25
telemetry-transfer passed 00:03:49
upgrade-consistency passed 00:05:24
upgrade-minor passed 00:06:24
users passed 00:04:52
Summary Value
Tests Run 25/25
Job Duration 01:26:16
Total Test Time 03:46:21

commit: 867ed47
image: perconalab/percona-postgresql-operator:PR-1407-867ed4715

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

Successfully merging this pull request may close these issues.

4 participants