Re: [PATCH] vacuumdb: Add --exclude-database option - Mailing list pgsql-hackers

From Khoa Nguyen
Subject Re: [PATCH] vacuumdb: Add --exclude-database option
Date
Msg-id CAONt3B2KHi-TbtZUKjvHh3URn+91EApWXKEjMdCXFMV3dLJvVg@mail.gmail.com
Whole thread
In response to Re: [PATCH] vacuumdb: Add --exclude-database option  (Ben Mejia <benjamin.arthur.mejia@gmail.com>)
List pgsql-hackers
On Wed, Jun 17, 2026 at 7:24 PM Ben Mejia
<benjamin.arthur.mejia@gmail.com> wrote:
>
> I think that the behavior of this patch that silently ignores --exlcude-database "non-existent-db" is broken. What if
someonehas a large database "my-db-name", and they misspell it: 
>
> $ vacuumdb --all --exclude-database "my-dbname"
>
> This will kick off a vacuum including the "my-db-name" they were trying to exclude.
>
> I think it would be better to generate an error and not do anything in this case.
+1

Since exclude-schema validates and stops on error, I think it would
make sense to do the same for exclude-database.  Current users are
used to this behavior so it's best to keep it consistent.

>
> This also tracks with vacuumdb's existing behavior on --table/--schema which will tell you about a typo.



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Deadlock detector fails to activate on a hot standby replica
Next
From: "Tristan Partin"
Date:
Subject: Re: updates for handling optional argument in system functions