pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hüseyin Demir <huseyin.d3r@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Cc: Shinya Kato <shinya11.kato@gmail.com>
Subject: Re: Add autovacuum_warning to surface concurrent vacuum collisions
Date: Fri, 26 Jun 2026 14:28:10 +0000
Message-ID: <178248409074.991.5212872724899470915.pgcf@coridan.postgresql.org> (raw)
In-Reply-To: <CAOzEurSChaPD2tMaEQ7k+=7cbgTL0D9j29o0J5-Se0SMDNWZGg@mail.gmail.com>
References: <CAOzEurSChaPD2tMaEQ7k+=7cbgTL0D9j29o0J5-Se0SMDNWZGg@mail.gmail.com>
	<CAOzEurSChaPD2tMaEQ7k+=7cbgTL0D9j29o0J5-Se0SMDNWZGg@mail.gmail.com>

Hi,

It is an area that genuinely lacks some observability however, I have some concerns about this patch that I think we can review. 
The condition being logged is correct, intentional behavior.  The skip mechanism is designed exactly for this case: 
Worker B backs off, moves to the next table, and the system makes progress. Logging correct behavior as if it were a warning conflates a healthy scheduler decision with a fault condition.
On any busy OLTP system with autovacuum_max_workers > 1, workers will skip tables held by other workers in every vacuum cycle.  That is not a transient edge case and it is the steady state of a loaded database.

This means the GUC has two operating modes: on a quiet system it never fires (no value), and on a busy system it always fires (pure noise).
The checkpoint_warning analogy does not hold up.  checkpoint_warning fires when the system deviates from healthy behavior (checkpoints too frequent).  This GUC fires during an expected behavior.  Furthermore, checkpoint_warning is an integer (seconds) with built-in rate limiting via elapsed time comparison; a bare boolean offers none of that, so on a loaded system it would emit one log line per skipped table per vacuum cycle per worker.
If the goal is to detect genuine autovacuum saturation, I think an example case would be a. worker that completes an entire vacuum cycle having done no work at all because every candidate table was already held by another worker.  That condition is already tracked, fires once per wasted cycle rather than once per table, and is a strong signal that a worker slot was completely wasted.  That is worth a single LOG

Also when it comes to name of GUC shouldn't we follow the log_autovacuum_* pattern ? 

Regards,
Demir.

view thread (7+ messages)  latest in thread

Message-ID: <178248409074.991.5212872724899470915.pgcf@coridan.postgresql.org>
Permalink:  ../178248409074.991.5212872724899470915.pgcf@coridan.postgresql.org/
Also on:    postgresql.org/message-id/178248409074.991.5212872724899470915.pgcf@coridan.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: huseyin.d3r@gmail.com, shinya11.kato@gmail.com
  Subject: Re: Add autovacuum_warning to surface concurrent vacuum collisions
  In-Reply-To: <178248409074.991.5212872724899470915.pgcf@coridan.postgresql.org>
  References: <CAOzEurSChaPD2tMaEQ7k+=7cbgTL0D9j29o0J5-Se0SMDNWZGg@mail.gmail.com> <178248409074.991.5212872724899470915.pgcf@coridan.postgresql.org>

* 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