Use WaitLatch() instead of pg_usleep() at end-of-vacuum truncation
Michael Paquier <michael@paquier.xyz>
Use WaitLatch() instead of pg_usleep() at end-of-vacuum truncation This has the advantage to make a process more responsive when the postmaster dies, even if the wait time was rather limited as there was only a 50ms timeout here. Another advantage of this change is for monitoring, as we gain a new wait event for the end-of-vacuum truncation. Author: Bharath Rupireddy Reviewed-by: Aleksander Alekseev, Thomas Munro, Michael Paquier Discussion: https://postgr.es/m/CALj2ACU4AdPCq6NLfcA-ZGwX7pPCK5FgEj-CAU0xCKzkASSy_A@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/monitoring.sgml | modified | +5 −0 |
| src/backend/access/heap/vacuumlazy.c | modified | +5 −1 |
| src/backend/utils/activity/wait_event.c | modified | +3 −0 |
| src/include/utils/wait_event.h | modified | +2 −1 |
Documentation touched
Discussion
- Can a child process detect postmaster death when in pg_usleep? 24 messages · 2021-04-14 → 2021-07-12