From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
---|---|
To: | Shinya Kato <shinya11(dot)kato(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Add mode column to pg_stat_progress_vacuum |
Date: | 2025-10-07 15:04:15 |
Message-ID: | aOUr74QOWeMrGEVr@nathan |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Aug 14, 2025 at 08:12:55PM +0900, Shinya Kato wrote:
> I would like to propose a patch that enhances the
> pg_stat_progress_vacuum view by adding a mode column. The patch is
> attached.
>
> Although it is possible to identify an anti-wraparound VACUUM through
> the process title (to prevent wraparound) or specific log entries, it
> would be significantly more convenient for monitoring purposes to have
> this status clearly indicated in the pg_stat_progress_vacuum view.
> This would enable DBAs to immediately understand the urgency of the
> vacuum process without needing to check separate logs or system
> processes.
This seems generally reasonable to me.
> This patch introduces a mode column to provide this visibility. The
> possible values are:
> - normal: A standard, user-initiated VACUUM or a regular autovacuum run.
> - anti-wraparound: An autovacuum run launched specifically to prevent
> transaction ID wraparound.
> - failsafe: A vacuum that has entered failsafe mode to prevent
> imminent transaction ID wraparound.
I wonder if we should also add "aggressive".
> I was able to manually verify the failsafe mode's behavior by using
> the existing test script at
> src/test/modules/xid_wraparound/t/001_emergency_vacuum.pl. This script
> successfully triggered the failsafe condition and the view reported
> the correct mode. However, I found this test to be somewhat flaky in
> my environment and decided not to add it to the patch to avoid
> introducing a potentially unstable test into the tree.
Perhaps there's something we can do with injection points to improve the
stability of the test.
--
nathan
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2025-10-07 15:12:25 | Re: Should we update the random_page_cost default value? |
Previous Message | Tom Lane | 2025-10-07 15:01:34 | Re: psql: Count all table footer lines in pager setup |