Re: Report oldest xmin source when autovacuum cannot remove tuples

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Shinya Kato <shinya11(dot)kato(at)gmail(dot)com>
Cc: Scott Ray <scott(at)scottray(dot)io>, wenhui qiu <qiuwenhuifx(at)gmail(dot)com>, Sami Imseih <samimseih(at)gmail(dot)com>, Japin Li <japinli(at)hotmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Report oldest xmin source when autovacuum cannot remove tuples
Date: 2026-11-16 22:05:00
Message-ID: CALj2ACVOHOGA=6P2_0pcd9afD_3ro4T9ioxX6Q1hhCtozWF0Vg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Thu, Oct 1, 2026 at 5:20 AM Shinya Kato <shinya11(dot)kato(at)gmail(dot)com> wrote:
>
> I presented this patch at PostgreSQL Developer Meeting [1], an offline
> event in Japan, and Fujii-san gave me the following comments.
>
> 1. If the blocker is looked up right after the cutoff is computed, one
> extra scan is enough.
> 2. Information that needs a second lookup, such as the active versus
> idle state and the prepared transaction GID, is out of scope for this
> patch and should come as a follow-up.
> 3. Do not widen the scope of the patch.
>
> v10 addresses all three.

Thanks for the updated patch. Sorry for the delay. I have been
thinking about how useful reporting the per-vacuum blocker will be
with the pg_xmin_horizon view proposed in the other thread. Why can't
users find the blockers with the view and the removable cutoff that is
already reported in the verbose log output?

Maybe we want this for historical purposes (?). IMHO, a separate proc
array scan is not the way to go for a couple of reasons. It may not
report the reason that was factored into the cutoff when it was
computed, and it may not be optimal to do another proc array and slot
scan with their locks in the vacuum path.

Thoughts?

--
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zsolt Parragi 2026-11-16 22:23:18 Re: [PATCH] Fix interval input at minimum signed field values (BUG #19746)
Previous Message Bharath Rupireddy 2026-11-16 22:02:57 Re: Parallel heap vacuum