pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Ryoga Yoshida <bt23yoshidar@oss.nttdata.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Bug fix in vacuumdb --buffer-usage-limit xxx -Z
Date: Fri, 22 Sep 2023 14:21:46 +0900
Message-ID: <ZQ0kanW9OGJYymWs@paquier.xyz> (raw)
In-Reply-To: <CAApHDvok_7zMMjDj-zcze+monKD8AQe5LpqgZ6U1PaPrvcnE8A@mail.gmail.com>
References: <08930c0b541700a5264e5fbf3a685f5a@oss.nttdata.com>
	<CAApHDvqRHeik_F8egXCQZXXnRgjj-Wg2rLsds1Kx-efv_1bYnA@mail.gmail.com>
	<CAApHDvqrfvwJy1g7bwBQgr9uTJU9e4OEtiLLDVfNuPmjB3+QFw@mail.gmail.com>
	<ZQvbvSygEe3aLUev@paquier.xyz>
	<CAApHDvok_7zMMjDj-zcze+monKD8AQe5LpqgZ6U1PaPrvcnE8A@mail.gmail.com>

On Thu, Sep 21, 2023 at 06:56:29PM +1200, David Rowley wrote:
> I deem it pretty unlikely that someone will accidentally remove the
> code that I just committed and a test to test that vacuumdb -Z
> --buffer-usage-limit ... passes the BUFFER_USAGE_LIMIT option would
> likely just forever mark that we once had a trivial bug that forgot to
> include the --buffer-usage-limit when -Z was specified.

Perhaps so.

> If others feel strongly that a test is worthwhile, then I'll reconsider.

I don't know if you would like that, but the addition is as simple as
the attached, FYI.
--
Michael

Attachments:

vacuumdb-tests.patch (text/x-diff, 1.3K) download diff --git a/src/bin/scripts/t/100_vacuumdb.pl b/src/bin/scripts/t/100_vacuumdb.pl index eccfcc54a1..597bbd8f54 100644 --- a/src/bin/scripts/t/100_vacuumdb.pl +++ b/src/bin/scripts/t/100_vacuumdb.pl @@ -40,6 +40,10 @@ $node->issues_sql_like( [ 'vacuumdb', '--disable-page-skipping', 'postgres' ], qr/statement: VACUUM \(DISABLE_PAGE_SKIPPING, SKIP_DATABASE_STATS\).*;/, 'vacuumdb --disable-page-skipping'); +$node->issues_sql_like( + [ 'vacuumdb', '--buffer-usage-limit', '0', 'postgres' ], + qr/statement: VACUUM \(SKIP_DATABASE_STATS, BUFFER_USAGE_LIMIT '0'\).*;/, + 'vacuumdb --buffer-usage-limit'); $node->issues_sql_like( [ 'vacuumdb', '--skip-locked', 'postgres' ], qr/statement: VACUUM \(SKIP_DATABASE_STATS, SKIP_LOCKED\).*;/, @@ -48,6 +52,10 @@ $node->issues_sql_like( [ 'vacuumdb', '--skip-locked', '--analyze-only', 'postgres' ], qr/statement: ANALYZE \(SKIP_LOCKED\).*;/, 'vacuumdb --skip-locked --analyze-only'); +$node->issues_sql_like( + [ 'vacuumdb', '--buffer-usage-limit', '0', '--analyze-only', 'postgres' ], + qr/statement: ANALYZE \(BUFFER_USAGE_LIMIT '0'\).*;/, + 'vacuumdb --buffer-usage-limit --analyze-only'); $node->command_fails( [ 'vacuumdb', '--analyze-only', '--disable-page-skipping', 'postgres' ], '--analyze-only and --disable-page-skipping specified together');
signature.asc (application/pgp-signature, 832B) download

view thread (8+ messages)

Message-ID: <ZQ0kanW9OGJYymWs@paquier.xyz>
Permalink:  ../ZQ0kanW9OGJYymWs@paquier.xyz/
Also on:    postgresql.org/message-id/ZQ0kanW9OGJYymWs@paquier.xyz

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: michael@paquier.xyz, dgrowleyml@gmail.com, bt23yoshidar@oss.nttdata.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Bug fix in vacuumdb --buffer-usage-limit xxx -Z
  In-Reply-To: <ZQ0kanW9OGJYymWs@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox