I detected several indexes that need reindexing, then I created a simple script to call REINDEX CONCURRENTLY for them
reindex index concurrently public."chp_id2015";
reindex index concurrently public."chp_tm2015";
reindex index concurrently public."chp_or2015";
When I call the script from pgadmin4 I get
ERROR: REINDEX CONCURRENTLY cannot run inside a transaction block
SQL state: 25001
It might be some option from pgadmin (by default the session has AUTOCOMMIT ON), but I tried also with dbeaver and the results are similar in that case:
SQL Error [25001]: ERROR: REINDEX CONCURRENTLY cannot be executed within a pipeline
On the command line there's the reindex command (info), but since it can't read from a list of indexes you have to use a syntax like:
reindexdb -d dbname -i index1 -i index2 ...
--file=option postgresql.org/docs/current/app-psql.html