-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add WAL synchronization wait before replica check
This commit introduces a new feature to ensure WAL (Write-Ahead Log) synchronization between the primary and standby before performing the replica check. Key changes include: 1.Add a new method wait_for_wal_sync() to poll and wait for WAL sync 2.Implement WAL sync check using pg_current_wal_lsn() and pg_stat_replication Call wait_for_wal_sync() before running the replica check This enhancement improves the reliability of the replica check by ensuring that all changes have been replicated before comparison, reducing false positives due to replication lag.
- Loading branch information
1 parent
f26f4ab
commit 6687050
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters