-
Notifications
You must be signed in to change notification settings - Fork 2
Comparing changes
Open a pull request
base repository: postgresql-cfbot/postgresql
base: cf/6265~1
head repository: postgresql-cfbot/postgresql
compare: cf/6265
- 5 commits
- 14 files changed
- 2 contributors
Commits on Dec 11, 2025
-
Extend xlogwait infrastructure with write and flush wait types
Add support for waiting on WAL write and flush LSNs in addition to the existing replay LSN wait type. This provides the foundation for extending the WAIT FOR command with MODE parameter. Key changes: - Add WAIT_LSN_TYPE_WRITE and WAIT_LSN_TYPE_FLUSH_STANDBY to WaitLSNType - Add GetCurrentLSNForWaitType() to retrieve current LSN - Add new wait events WAIT_EVENT_WAIT_FOR_WAL_WRITE and WAIT_EVENT_WAIT_FOR_WAL_FLUSH for pg_stat_activity visibility - Update WaitForLSN() to use GetCurrentLSNForWaitType() internally
Configuration menu - View commit details
-
Copy full SHA for 19c33a9 - Browse repository at this point
Copy the full SHA 19c33a9View commit details -
Add MODE parameter to WAIT FOR LSN command
Extend the WAIT FOR LSN command with an optional MODE parameter that specifies which LSN type to wait for: WAIT FOR LSN '<lsn>' [MODE { REPLAY | WRITE | FLUSH }] [WITH (...)] - REPLAY (default): Wait for WAL to be replayed to the specified LSN - WRITE: Wait for WAL to be written (received) to the specified LSN - FLUSH: Wait for WAL to be flushed to disk at the specified LSN The default mode is REPLAY, matching the original behavior when MODE is not specified. This follows the pattern used by LOCK command where the mode parameter is optional with a sensible default. The WRITE and FLUSH modes are useful for scenarios where applications need to ensure WAL has been received or persisted on the standby without necessarily waiting for replay to complete. Also includes: - Documentation updates for the new syntax and refactoring of existing WAIT FOR command documentation - Test coverage for all three modes including mixed concurrent waiters - Wakeup logic in walreceiver for WRITE/FLUSH waitersConfiguration menu - View commit details
-
Copy full SHA for b6ca0f2 - Browse repository at this point
Copy the full SHA b6ca0f2View commit details -
Add tab completion for WAIT FOR LSN MODE parameter
Update psql tab completion to support the optional MODE parameter in WAIT FOR LSN command. After specifying an LSN value, completion now offers both MODE and WITH keywords since MODE defaults to REPLAY.
Configuration menu - View commit details
-
Copy full SHA for 488388a - Browse repository at this point
Copy the full SHA 488388aView commit details -
Use WAIT FOR LSN in PostgreSQL::Test::Cluster::wait_for_catchup()
Replace polling-based catchup waiting with WAIT FOR LSN command when running on a standby server. This is more efficient than repeatedly querying pg_stat_replication as the WAIT FOR command uses the latch- based wakeup mechanism. The optimization applies when: - The node is in recovery (standby server) - The mode is 'replay', 'write', or 'flush' (not 'sent') For 'sent' mode or when running on a primary, the function falls back to the original polling approach since WAIT FOR LSN is only available during recovery.
Configuration menu - View commit details
-
Copy full SHA for 87ac09a - Browse repository at this point
Copy the full SHA 87ac09aView commit details -
[CF 6265] v4 - Add MODE parameter to WAIT FOR LSN command
This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/6265 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/CABPTF7U2cYN=bMZirqj93Zv-aqBdw4f=wPRwovTzWKP=adYhDg@mail.gmail.com Author(s): Xuneng Zhou
Commitfest Bot committedDec 11, 2025 Configuration menu - View commit details
-
Copy full SHA for ce2a644 - Browse repository at this point
Copy the full SHA ce2a644View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff cf/6265~1...cf/6265