Thread

Commits

  1. vacuumdb: Do not run VACUUM (ONLY_DATABASE_STATS) when --analyze-only.

  1. vacuumdb --analyze-only does not need to issue VACUUM (ONLY_DATABASE_STATS) ?

    Fujii Masao <masao.fujii@gmail.com> — 2025-08-08T06:57:36Z

    Hi,
    
    I noticed that vacuumdb --analyze-only currently issues
    VACUUM (ONLY_DATABASE_STATS). Is this actually needed?
    BTW, vacuumdb does not run this command when --analyze-in-stages
    is specified.
    
    The attached patch modifies vacuumdb to skip
    VACUUM (ONLY_DATABASE_STATS) when --analyze-only is used
    
    Regards,
    
    -- 
    Fujii Masao
    
  2. Re: vacuumdb --analyze-only does not need to issue VACUUM (ONLY_DATABASE_STATS) ?

    Mircea Cadariu <cadariu.mircea@gmail.com> — 2025-09-16T13:05:45Z

    The following review has been posted through the commitfest application:
    make installcheck-world:  tested, passed
    Implements feature:       tested, passed
    Spec compliant:           tested, passed
    Documentation:            tested, passed
    
    Hi, 
    
    I tested the patch with log_statement = 'all' and I confirm I do not see the VACUUM log line anymore. 
    
    You could consider adding the following representative test in src/bin/scripts/t/100_vacuumdb.pl: 
    $node->issues_sql_unlike(
        [ 'vacuumdb', '--analyze-only', 'postgres' ],
        qr/statement: VACUUM.*;/,
        'vacuumdb --analyze-only skips vacuum');
    
    Kind regards,
    Mircea Cadariu
    
    The new status of this patch is: Waiting on Author
    
  3. Re: vacuumdb --analyze-only does not need to issue VACUUM (ONLY_DATABASE_STATS) ?

    Fujii Masao <masao.fujii@gmail.com> — 2025-09-16T15:36:45Z

    On Tue, Sep 16, 2025 at 10:06 PM Mircea Cadariu
    <cadariu.mircea@gmail.com> wrote:
    >
    > The following review has been posted through the commitfest application:
    > make installcheck-world:  tested, passed
    > Implements feature:       tested, passed
    > Spec compliant:           tested, passed
    > Documentation:            tested, passed
    >
    > Hi,
    >
    > I tested the patch with log_statement = 'all' and I confirm I do not see the VACUUM log line anymore.
    
    Thanks for the review and testing!
    
    
    > You could consider adding the following representative test in src/bin/scripts/t/100_vacuumdb.pl:
    > $node->issues_sql_unlike(
    >     [ 'vacuumdb', '--analyze-only', 'postgres' ],
    >     qr/statement: VACUUM.*;/,
    >     'vacuumdb --analyze-only skips vacuum');
    
    +1. I've added that test to the patch.
    Attached is the updated version of the patch.
    
    Regards,
    
    -- 
    Fujii Masao
    
  4. Re: vacuumdb --analyze-only does not need to issue VACUUM (ONLY_DATABASE_STATS) ?

    Mircea Cadariu <cadariu.mircea@gmail.com> — 2025-09-22T08:56:26Z

    Hi,
    
    On Tue, Sep 16, 2025 at 5:36 PM Fujii Masao <masao.fujii@gmail.com> wrote:
    
    > Attached is the updated version of the patch.
    >
    
    Thanks for the updated version! LGTM.
    
    Kind regards,
    Mircea Cadariu
    
  5. Re: vacuumdb --analyze-only does not need to issue VACUUM (ONLY_DATABASE_STATS) ?

    Fujii Masao <masao.fujii@gmail.com> — 2025-09-22T15:44:23Z

    On Mon, Sep 22, 2025 at 5:56 PM Mircea Cadariu <cadariu.mircea@gmail.com> wrote:
    >
    > Hi,
    >
    > On Tue, Sep 16, 2025 at 5:36 PM Fujii Masao <masao.fujii@gmail.com> wrote:
    >>
    >> Attached is the updated version of the patch.
    >
    >
    > Thanks for the updated version! LGTM.
    
    Thanks for the review!
    Unless there are any objections, I'll commit the patch.
    
    Regards,
    
    -- 
    Fujii Masao
    
    
    
    
  6. Re: vacuumdb --analyze-only does not need to issue VACUUM (ONLY_DATABASE_STATS) ?

    Fujii Masao <masao.fujii@gmail.com> — 2025-09-24T16:40:27Z

    On Tue, Sep 23, 2025 at 12:44 AM Fujii Masao <masao.fujii@gmail.com> wrote:
    >
    > On Mon, Sep 22, 2025 at 5:56 PM Mircea Cadariu <cadariu.mircea@gmail.com> wrote:
    > >
    > > Hi,
    > >
    > > On Tue, Sep 16, 2025 at 5:36 PM Fujii Masao <masao.fujii@gmail.com> wrote:
    > >>
    > >> Attached is the updated version of the patch.
    > >
    > >
    > > Thanks for the updated version! LGTM.
    >
    > Thanks for the review!
    > Unless there are any objections, I'll commit the patch.
    
    I've pushed the patch. Thanks!
    
    Regards,
    
    -- 
    Fujii Masao