From: ritojoao (@ritojoao) <noreply+ritojoao@github.com>
To: reorg/pg_repack <noreply+reorg-pg_repack@github.com>
Subject: Re: [reorg/pg_repack] issue #259: When using options "--exclude-extension/-C" with wrong value, no error message output
Date: Mon, 16 Nov 2026 12:46:50 +0000
Message-ID: <gh-reorg-pg_repack-259-c6916820786@github.com> (raw)
In-Reply-To: <gh-reorg-pg_repack-259@github.com>
References: <gh-reorg-pg_repack-259@github.com>
Hi, thanks for pg_repack. I reproduced this on PostgreSQL 17 with current master: `pg_repack --exclude-extension=XXX` with an extension that does not exist exits with 0 and repacks everything. I wrote a small patch that checks the name against `pg_extension` and fails with `extension "XXX" does not exist` (exit 21). A valid extension (`plpgsql`, `pg_repack`) still works, and the option given as a list or twice also behaves. `make installcheck` shows the same two failures as without the patch (tablespace and publication, they are environment related).
One thing I want to ask before I open a PR: the existing `repack-check` tests use `dummy_extension`, which does not exist, and expect success. With the patch I had to change 2 expected lines in 4 `.out` files. Is the silent ignore intended? If it is, I will not send the patch. I did not test other PostgreSQL versions or Windows, and I did not test `--all` when the extension exists in only some databases (the patch makes the other databases fail).