Minimal fix for WAIT FOR ... MODE 'standby_flush'
Andres Freund <andres@anarazel.de>
Minimal fix for WAIT FOR ... MODE 'standby_flush' The investigation into the negative test performance impact of 7e8aeb9e483 lead to discovering that there are a few issues with WAIT FOR. This commit is just a minimal fix to prevent hangs in standby_flush mode, due to WAIT FOR ... 'standby_flush' seeing a 0 LSN if a newly started walreceiver does not receive any writes, because the stanby is already caught up. There are several other issues and this is isn't necessarily the best fix. But this way we get the hangs out of the way. Reported-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/zqbppucpmkeqecfy4s5kscnru4tbk6khp3ozqz6ad2zijz354k@w4bdf4z3wqoz
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/replication/walreceiver.c | modified | +0 −2 |
| src/backend/replication/walreceiverfuncs.c | modified | +1 −0 |
Discussion
- Implement waiting for wal lsn replay: reloaded 154 messages · 2024-11-27 → 2026-07-08