Thread

  1. Re: Add mode column to pg_stat_progress_vacuum

    Shinya Kato <shinya11.kato@gmail.com> — 2025-11-20T06:23:32Z

    On Thu, Nov 20, 2025 at 10:34 AM Sami Imseih <samimseih@gmail.com> wrote:
    >
    > Hi,
    >
    > The patch looks overall good to me. I have a few comments:
    
    Thank you for your review!
    
    > 1/ I believe It is possible for the mode to flip to "failsafe" during the
    > operation since lazy_check_wraparound_failsafe() is checked in-flight.
    > I think this should be mentioned in the "mode" section of the documentation
    > in the "failsafe" description.
    
    +1, I've added the below statement to the v7 patch.
    ---
    The vacuum may start in this mode or switch to it while running; the
    value of the mode column may transition from another mode to failsafe
    during the operation.
    ---
    
    > 2/ It feels odd that we do not have parity of the "mode" column in
    > pg_stat_progress_analyze. Should we add a "mode" column
    > there also that shows if the analyze was triggered_by "manual" or
    > "autovacuum"? An autovacuum in a relation can trigger both
    > a vacuum and an analyze, and a VACUUM(ANALYZE) will
    > also do both.
    
    Thank you for your suggestions. I've created another patch v7-0002
    adding a "triggered_by" column to pg_stat_progress_analyze.
    
    -- 
    Best regards,
    Shinya Kato
    NTT OSS Center