pg.ddx.io  reorg/pg_repack GitHub issues and pull requests  
help / color / mirror / Atom feed
[reorg/pg_repack] issue #259: When using options "--exclude-extension/-C" with wrong value, no error message output
2+ messages / 2 participants
[nested] [flat]

* [reorg/pg_repack] issue #259: When using options "--exclude-extension/-C" with wrong value, no error message output
@ 2020-12-21 09:29  "ChenJiaoqian (@ChenJiaoqian)" <noreply+ChenJiaoqian@github.com>
  0 siblings, 0 replies; 2+ messages in thread

From: ChenJiaoqian (@ChenJiaoqian) @ 2020-12-21 09:29 UTC (permalink / raw)
  To: reorg/pg_repack <noreply+reorg-pg_repack@github.com>

When using options --exclude-extension/-C with wrong values, there are no error message output and the program ends normally.

For example:
```
[postgres@postgresql pg_repack]$ pg_repack --exclude-extension=XXX
INFO: repacking table "dbms_stats.backup_history"
INFO: repacking table "dbms_stats.column_stats_backup"
INFO: repacking table "dbms_stats.column_stats_locked"
INFO: repacking table "dbms_stats.relation_stats_backup"
INFO: repacking table "dbms_stats.relation_stats_locked"
INFO: repacking table "public.test_table"
[postgres@postgresql pg_repack]$
[postgres@postgresql pg_repack]$ echo $?
0
[postgres@postgresql pg_repack]$
```

When other parameters use the wrong value, an error message will be output.
For example:
```
[postgres@postgresql pg_repack]$ pg_repack -t XXX
ERROR: pg_repack failed with error: ERROR:  relation "xxx" does not exist
[postgres@postgresql pg_repack]$
[postgres@postgresql pg_repack]$ echo $?
20
[postgres@postgresql pg_repack]$
```

So I think it should output error message when wrong values are used in options --exclude-extension/-C.

^ permalink  raw  [nested|flat] 2+ messages in thread

* Re: [reorg/pg_repack] issue #259: When using options "--exclude-extension/-C" with wrong value, no error message output
@ 2026-11-16 12:46  "ritojoao (@ritojoao)" <noreply+ritojoao@github.com>
  0 siblings, 0 replies; 2+ messages in thread

From: ritojoao (@ritojoao) @ 2026-11-16 12:46 UTC (permalink / raw)
  To: reorg/pg_repack <noreply+reorg-pg_repack@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).


^ permalink  raw  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-11-16 12:46 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-12-21 09:29 [reorg/pg_repack] issue #259: When using options "--exclude-extension/-C" with wrong value, no error message output "ChenJiaoqian (@ChenJiaoqian)" <noreply+ChenJiaoqian@github.com>
2026-11-16 12:46 Re: [reorg/pg_repack] issue #259: When using options "--exclude-extension/-C" with wrong value, no error message output "ritojoao (@ritojoao)" <noreply+ritojoao@github.com>

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