diff options
| author | Alexander Korotkov <akorotkov@postgresql.org> | 2025-11-15 12:16:23 +0200 |
|---|---|---|
| committer | Alexander Korotkov <akorotkov@postgresql.org> | 2025-11-15 12:27:42 +0200 |
| commit | ede6acef49673df0a880edae405ca69393bb48d0 (patch) | |
| tree | 9ab68b880055dac42f4d441a1ed6089ba88011b8 /src/backend/access/heap/hio.c | |
| parent | 446568c22207795da02e26b6b2956a61bd17e912 (diff) | |
Fix WaitLSNWakeup() fast-path check for InvalidXLogRecPtr
WaitLSNWakeup() incorrectly returned early when called with
InvalidXLogRecPtr (meaning "wake all waiters"), because the fast-path
check compared minWaitedLSN > 0 without validating currentLSN first.
This caused WAIT FOR LSN commands to wait indefinitely during standby
promotion until random signals woke them.
Add an XLogRecPtrIsValid() check before the comparison so that
InvalidXLogRecPtr bypasses the fast-path and wakes all waiters immediately.
Discussion: https://postgr.es/m/CABPTF7UieOYbOgH3EnQCasaqcT1T4N6V2wammwrWCohQTnD_Lw%40mail.gmail.com
Author: Xuneng Zhou <xunengzhou@gmail.com>
Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com>
Diffstat (limited to 'src/backend/access/heap/hio.c')
0 files changed, 0 insertions, 0 deletions
