1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

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
This commit is contained in:
Michael Paquier
2021-07-02 12:58:34 +09:00
parent a2595e039c
commit 70685385d7
4 changed files with 15 additions and 2 deletions

View File

@ -2242,6 +2242,11 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
<entry><literal>VacuumDelay</literal></entry>
<entry>Waiting in a cost-based vacuum delay point.</entry>
</row>
<row>
<entry><literal>VacuumTruncate</literal></entry>
<entry>Waiting to acquire an exclusive lock to truncate off any
empty pages at the end of a table vacuumed.</entry>
</row>
</tbody>
</tgroup>
</table>