Re: [PATCH] vacuumdb: Add --exclude-database option

From: Ben Mejia <benjamin(dot)arthur(dot)mejia(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: Mohamed ALi <moali(dot)pg(at)gmail(dot)com>
Subject: Re: [PATCH] vacuumdb: Add --exclude-database option
Date: 2026-06-16 21:45:00
Message-ID: 178164630022.991.17103275074682108158.pgcf@coridan.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I think that the behavior of this patch that silently ignores --exlcude-database "non-existent-db" is broken. What if someone has 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.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Alexander Nestorov 2026-06-16 21:41:39 Re: Multi-Entry Indexing for GiST & SP-GiST