Re: Report oldest xmin source when autovacuum cannot remove tuples

Shinya Kato <shinya11.kato@gmail.com>

From: Shinya Kato <shinya11.kato@gmail.com>
To: scott@scottray.io
Cc: Laurenz Albe <laurenz.albe@cybertec.at>, Japin Li <japinli@hotmail.com>, wenhui qiu <qiuwenhuifx@gmail.com>, Sami Imseih <samimseih@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-05-31T13:06:36Z
Lists: pgsql-hackers
On Sat, May 30, 2026 at 11:31 AM Scott Ray <scott@scottray.io> wrote:
>
> > I guess the overhead of one more scan of the process array for every autovacuum
> > run if "log_autovacuum_min_duration" is non-zero (which is the default)
> > is acceptable.
>
>
> Could vacuum compute the blocker during ComputeXidHorizons and consume it at log time?
> Avoids the extra scan, and binds the blocker to the horizon vacuum used for pruning.

As Sami suggested in [0], I think this design is a cleaner approach
because it separates the responsibilities of ComputeXidHorizons and
the calculation of vacuum blockers.

[0] https://www.postgresql.org/message-id/CAA5RZ0s%2BUUXekbeGcC-H71kW%3DMfeaUCOV%3DyEWX94NXViO2-%3DpA%40mail.gmail.com


-- 
Best regards,
Shinya Kato
NTT OSS Center