Re: [Proposal] vacuumdb --schema only

Gilles Darold <gilles@migops.com>

From: Gilles Darold <gilles@migops.com>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Nathan Bossart <nathandbossart@gmail.com>, Robert Treat <rob@xzilla.net>, pgsql-hackers@postgresql.org
Date: 2022-04-08T15:16:06Z
Lists: pgsql-hackers

Attachments

Le 08/04/2022 à 02:46, Justin Pryzby a écrit :
> On Wed, Apr 06, 2022 at 07:43:42PM +0200, Gilles Darold wrote:
>> Thanks for the review, all these changes are available in new version v6
>> of the patch and attached here.
> This is failing in CI (except on macos, which is strangely passing).
> http://cfbot.cputube.org/gilles-darold.html
>
> https://api.cirrus-ci.com/v1/artifact/task/5379693443547136/log/src/bin/scripts/tmp_check/log/regress_log_100_vacuumdb
>
> not ok 59 - vacuumdb --schema "Foo" postgres exit code 0
>
> #   Failed test 'vacuumdb --schema "Foo" postgres exit code 0'
> #   at t/100_vacuumdb.pl line 151.
> not ok 60 - vacuumdb --schema schema only: SQL found in server log
>
> #   Failed test 'vacuumdb --schema schema only: SQL found in server log'
> #   at t/100_vacuumdb.pl line 151.
> #                   '2022-04-06 18:15:36.313 UTC [34857][not initialized] [[unknown]][:0] LOG:  connection received: host=[local]
> # 2022-04-06 18:15:36.314 UTC [34857][client backend] [[unknown]][3/2801:0] LOG:  connection authorized: user=postgres database=postgres application_name=100_vacuumdb.pl
> # 2022-04-06 18:15:36.318 UTC [34857][client backend] [100_vacuumdb.pl][3/2802:0] LOG:  statement: SELECT pg_catalog.set_config('search_path', '', false);
> # 2022-04-06 18:15:36.586 UTC [34857][client backend] [100_vacuumdb.pl][:0] LOG:  disconnection: session time: 0:00:00.273 user=postgres database=postgres host=[local]
> # '
> #     doesn't match '(?^:VACUUM "Foo".bar)'


Ok, got it with the help of rjuju. Actually it was compiling well using 
gcc but clang give some warnings. A fix of these warning makes CI happy.


Attached v7 of the patch that should pass cfbot.

-- 
Gilles Darold

Commits

  1. Add --schema and --exclude-schema options to vacuumdb.