doc: pg_restore --filter refers to nonexistent --indexes option

Started by Taras Klobaabout 7 hours ago2 messageshackers
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

won't retrysuccessCI history

This thread has been committed, so CI has stopped here. Anything below is the last result it produced.

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t254400
psql -h localhost -U postgres

Built from patchset v1 (message #1), October 26, 2026 at 06:15 PM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t254400_1 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t254400_1 && git checkout t254400_1

Patchset v1 (message #1) is on t254400_1

Jump to latest
#1Taras Kloba
taras.kloba@gmail.com

Hi hackers,

In the pg_restore reference page, the description of the "index"
keyword for --filter says that it "works like the -I/--indexes
option", but the long option is --index:

$ pg_restore --indexes=t_a_idx -f - v.dump
pg_restore: unrecognized option '--indexes=t_a_idx'

$ pg_restore --index=t_a_idx -f - v.dump
CREATE INDEX t_a_idx ON public.t USING btree (a);

A filter file containing "include index t_a_idx" gives the same result
as --index, as intended. The attached one-line patch fixes the option
name.

The mistake dates from commit a5cf808be55, which added --filter in
v17, so the patch could be back-patched to 17. It applies cleanly to
REL_18_STABLE and REL_19_STABLE; on REL_17_STABLE the option list is
ordered differently, so a cherry-pick conflicts, but "git am" works.
I also have a version made against REL_17_STABLE if that's easier.

Regards,
Taras Kloba

Attachments:

t254400_1
v1-0001-doc-Fix-option-name-in-pg_restore-s-filter-descri.patchapplication/octet-stream; name=v1-0001-doc-Fix-option-name-in-pg_restore-s-filter-descri.patchDownload+1-3
#2Daniel Gustafsson
daniel@yesql.se
In reply to: Taras Kloba (#1)
Re: doc: pg_restore --filter refers to nonexistent --indexes option

On 26 Oct 2026, at 18:53, Taras Kloba <taras.kloba@gmail.com> wrote:

In the pg_restore reference page, the description of the "index"
keyword for --filter says that it "works like the -I/--indexes
option", but the long option is --index:

Thanks for the report and patch, pushed and backpatched through 17.

--
Daniel Gustafsson