agora inbox for pgsql-admin@postgresql.org
help / color / mirror / Atom feedFeature Request: multithreaded reindexdb --concurrently of a single table
3+ messages / 2 participants
[nested] [flat]
* Feature Request: multithreaded reindexdb --concurrently of a single table
@ 2025-02-18 18:24 Ron Johnson <ronljohnsonjr@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Ron Johnson @ 2025-02-18 18:24 UTC (permalink / raw)
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
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!
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Feature Request: multithreaded reindexdb --concurrently of a single table
@ 2025-02-21 18:46 Álvaro Herrera <alvherre@alvh.no-ip.org>
parent: Ron Johnson <ronljohnsonjr@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Álvaro Herrera @ 2025-02-21 18:46 UTC (permalink / raw)
To: Ron Johnson <ronljohnsonjr@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
On 2025-Feb-18, Ron Johnson wrote:
> 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.
I don't think multiple REINDEX commands can run concurrently on the same
table, so this is not a reindexdb issue but a server issue. And TBH I
think the server feature to support that is not likely to be implemented
soon.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
"Ed is the standard text editor."
http://groups.google.com/group/alt.religion.emacs/msg/8d94ddab6a9b0ad3
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Feature Request: multithreaded reindexdb --concurrently of a single table
@ 2025-02-22 00:03 Ron Johnson <ronljohnsonjr@gmail.com>
parent: Álvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 0 replies; 3+ messages in thread
From: Ron Johnson @ 2025-02-22 00:03 UTC (permalink / raw)
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
On Fri, Feb 21, 2025 at 1:46 PM Álvaro Herrera <alvherre@alvh.no-ip.org>
wrote:
> On 2025-Feb-18, Ron Johnson wrote:
>
> > 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.
>
> I don't think multiple REINDEX commands can run concurrently on the same
> table, so this is not a reindexdb issue but a server issue. And TBH I
> think the server feature to support that is not likely to be implemented
> soon.
>
That's a shame. Big server, lots of RAM, lots of CPUs, a big table, and
lots of indices just begs for concurrently running REINDEX / CREATE INDEX
statements on the same table.
--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2025-02-22 00:03 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-02-18 18:24 Feature Request: multithreaded reindexdb --concurrently of a single table Ron Johnson <ronljohnsonjr@gmail.com>
2025-02-21 18:46 ` Álvaro Herrera <alvherre@alvh.no-ip.org>
2025-02-22 00:03 ` Ron Johnson <ronljohnsonjr@gmail.com>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox