Feature Request: multithreaded reindexdb --concurrently of a single table

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Feature Request: multithreaded reindexdb --concurrently of a single table
Date: 2025-02-18 18:24:26
Message-ID: CANzqJaCWmJDMvfZR2Zsi=dzjNmRYJoyM_CMLN9L58GEU9YSvYQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

PG 14.15

This command executes the single command "REINDEX TABLE foo;" and the
reindexfb doc page says that --jobs is incompatible with --index.

$ reindexdb -d dba -v --concurrently -j4 -t foo
INFO: index "public.foo_pkey" was reindexed
INFO: index "public.i_foo_2" was reindexed
INFO: index "public.i_foo_3" was reindexed
INFO: index "public.i_foo_23" was reindexed
INFO: table "public.foo" was reindexed
DETAIL: CPU: user: 26.90 s, system: 7.47 s, elapsed: 59.37 s.

It would be really really handy to be able to run multiple REINDEX INDEX
jobs at the same time, either by just specifying the table as above and
reindexdb automagically getting the index names, or by manually enumerating
each index, and then see all four REINDEX INDEX statements in
pg_stat_activity.

$ reindexdb -d dba -v --concurrently -j4 -i foo_pkey -i i_foo_2 -i i_foo_3 -i
i_foo_23

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Kouber Saparev 2025-02-18 20:18:56 Re: CREATE SUBSCRIPTION hangs indefinitely
Previous Message kaido vaikla 2025-02-18 16:59:38 Replica and transaction