postgresql/src/bin/scripts
Alexander Korotkov 09ef2f8df1 reindexdb: Fix the index-level REINDEX with multiple jobs
47f99a407d introduced a parallel index-level REINDEX.  The code was written
assuming that running run_reindex_command() with 'async == true' can schedule
a number of queries for a connection.  That's not true, and the second query
sent using run_reindex_command() will wait for the completion of the previous
one.

This commit fixes that by putting REINDEX commands for the same table into a
single query.

Also, this commit removes the 'async' argument from run_reindex_command(),
as only its call always passes 'async == true'.

Reported-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/202503071820.j25zn3lo4hvn%40alvherre.pgsql
Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
Backpatch-through: 17
2025-03-16 13:29:20 +02:00
..
po Translation updates 2025-02-17 17:51:30 +01:00
t Make sure to run pg_isready on correct port 2024-07-13 08:08:07 -04:00
.gitignore Remove createlang and droplang 2017-03-23 14:16:45 -04:00
clusterdb.c clusterdb: Allow specifying tables to process in all databases. 2024-03-11 13:11:20 -05:00
common.c Specify the encoding of input to fmtId() 2025-02-10 10:03:38 -05:00
common.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
createdb.c Specify the encoding of input to fmtId() 2025-02-10 10:03:38 -05:00
createuser.c Specify the encoding of input to fmtId() 2025-02-10 10:03:38 -05:00
dropdb.c Specify the encoding of input to fmtId() 2025-02-10 10:03:38 -05:00
dropuser.c Specify the encoding of input to fmtId() 2025-02-10 10:03:38 -05:00
Makefile Update copyright for 2024 2024-01-03 20:49:05 -05:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
nls.mk Add missing source files to nls.mk 2024-06-13 10:17:36 +02:00
pg_isready.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
reindexdb.c reindexdb: Fix the index-level REINDEX with multiple jobs 2025-03-16 13:29:20 +02:00
vacuumdb.c Specify the encoding of input to fmtId() 2025-02-10 10:03:38 -05:00