pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feedFrom: Andres Freund <andres@anarazel.de>
To: pgsql-hackers@postgresql.org
Subject: Why does [auto-]vacuum delay not report a wait event?
Date: Thu, 19 Mar 2020 15:44:49 -0700
Message-ID: <20200319224449.pbjrivflbf4x76tj@alap3.anarazel.de> (raw)
Hi,
I was looking at [1], wanting to suggest a query to monitor what
autovacuum is mostly waiting on. Partially to figure out whether it's
mostly autovacuum cost limiting.
But uh, unfortunately the vacuum delay code just sleeps without setting
a wait event:
void
vacuum_delay_point(void)
{
...
/* Nap if appropriate */
if (msec > 0)
{
if (msec > VacuumCostDelay * 4)
msec = VacuumCostDelay * 4;
pg_usleep((long) (msec * 1000));
Seems like it should instead use a new wait event in the PG_WAIT_TIMEOUT
class?
Given how frequently we run into trouble with [auto]vacuum throttling
being a problem, and there not being any way to monitor that currently,
that seems like it'd be a significant improvement, given the effort?
It'd probably also be helpful to report the total time [auto]vacuum
spent being delayed for vacuum verbose/autovacuum logging, but imo
that'd be a parallel feature to a wait event, not a replacement.
Greetings,
Andres Freund
[1] https://postgr.es/m/CAE39h22zPLrkH17GrkDgAYL3kbjvySYD1io%2BrtnAUFnaJJVS4g%40mail.gmail.com
view thread (11+ messages) latest in thread
Message-ID: <20200319224449.pbjrivflbf4x76tj@alap3.anarazel.de>
Permalink: ../20200319224449.pbjrivflbf4x76tj@alap3.anarazel.de/
Also on: postgresql.org/message-id/20200319224449.pbjrivflbf4x76tj@alap3.anarazel.de
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: andres@anarazel.de
Subject: Re: Why does [auto-]vacuum delay not report a wait event?
In-Reply-To: <20200319224449.pbjrivflbf4x76tj@alap3.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox