On Fri, Oct 31, 2025 at 7:17 AM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> Hello,
>
> Here's a new installment of this series, v25, including the CONCURRENTLY
> part, which required some conflict fixes on top of the much-changed
> v24-0001 patch.
>
<refnamediv>
<refname>pg_repackdb</refname>
<refpurpose>repack and analyze a <productname>PostgreSQL</productname>
database</refpurpose>
</refnamediv>
but with --all option specified, it's doing repack whole cluster.
(more than one database).
I am not fully sure this description is OK.
I think pg_repackdb Synopsis section:
pg_repackdb [connection-option...] [option...] [ -t | --table table [(
column [,...] )] ] ... [ dbname | -a | --all ]
pg_repackdb [connection-option...] [option...] [ -n | --schema schema
] ... [ dbname | -a | --all ]
pg_repackdb [connection-option...] [option...] [ -N | --exclude-schema
schema ] ... [ dbname | -a | --all ]
can be simplified the same way as as pg_dump:
pg_repackdb [connection-option...] [option...] [ dbname | -a | --all ]
------------------------
[-d] dbname
[--dbname=]dbname
what do you think to expand it as below:
dbname
-d dbname
--dbname=dbname
--------------------
+ printf(_(" --index[=INDEX] repack following an index\n"));
should it be
+ printf(_("--index[=INDEX] repack following an index\n"));
?
similar to pg_dump:
printf(_("\nIf no database name is supplied, then the PGDATABASE
environment\n"
"variable value is used.\n\n"));
in pg_repackdb help section, we can mention:
printf(_("\nIf no database name is supplied and --all option not
specified then the PGDATABASE environment\n"
"variable value is used.\n\n"));
Do you think it's necessary?
what the expectation of
pg_repackdb --index=index_name, the doc is not very helpful.
pg_repackdb --analyze --index=zz --verbose
pg_repackdb: repacking database "src3"
pg_repackdb: error: processing of database "src3" failed: ERROR: "zz"
is not an index for table "tenk1"
select pg_get_indexdef ('zz'::regclass);
pg_get_indexdef
---------------------------------------------------
CREATE INDEX zz ON public.tenk2 USING btree (two)
------
jian he
EDB: http://www.enterprisedb.com