Hi!
$subj doesn't work. I bumped into it while doing some corruption fixing.
repro:
create table z(i int);
create index z_1 on z(i);
create index z_2 on z(i);
reshke@pg-bench-dc:~/pgmaster$
/home/reshke/pgmaster/pgbinm/bin/reindexdb -p 7777 --concurrently -i
z_1 -i z_2 -j 1
reshke@pg-bench-dc:~/pgmaster$
/home/reshke/pgmaster/pgbinm/bin/reindexdb -p 7777 --concurrently -i
z_1 -i z_2 -j 2
reindexdb: error: processing of database "reshke" failed: ERROR:
REINDEX CONCURRENTLY cannot run inside a transaction block
The root cause is that reindexdb tries to parallelize REINDEX by
batching all commands related to one table in one job. However,
implementation of this makes multiple DDL query an multistatement
which is transformed into implicit transaction server-side.
Oversight of 47f99a407d. I didn't find any related bug report, so it
looks like this feature is not widely used. affected versions and
17-19 and master.
PFA fix.
--
Best regards,
Kirill Reshke