Bug report
pgAdmin version: 9.17
PostgreSQL version: 13.2
OS: Ubuntu 24.04.4 LTS
Description
Running REINDEX TABLE with the "Concurrently" option enabled from the
Maintenance dialog generates invalid SQL. CONCURRENTLY is placed inside
the parenthesized option list alongside VERBOSE, but PostgreSQL only
accepts CONCURRENTLY as a standalone keyword placed between the target
type and the target name — not as a parenthesized option.
Steps to reproduce
- Right-click a table (e.g.
public."Command") → Maintenance...
- Select "REINDEX", enable "Verbose" and "Concurrently"
- Run
Generated SQL (invalid)
sql REINDEX (VERBOSE, CONCURRENTLY) TABLE public."Command";
Error
ERROR: syntax error at or near "CONCURRENTLY" LINE 1: REINDEX (VERBOSE, CONCURRENTLY) TABLE public."Command"; ^
Expected SQL
sql REINDEX (VERBOSE) TABLE CONCURRENTLY public."Command";
Root cause (from source)
In web/pgadmin/tools/maintenance/templates/maintenance/sql/command.sql,
CONCURRENTLY is appended to the same maintenance_options list as
VERBOSE/TABLESPACE/etc., and the whole list is rendered inside a single
(...) clause before the target type/name. Per the PostgreSQL grammar,
CONCURRENTLY is not a parenthesizable REINDEX option — it must appear
after the object type keyword (TABLE/INDEX/SCHEMA/...) and before the
object name. The template needs to emit CONCURRENTLY there instead of
inside the options parens.
Impact
Any REINDEX (TABLE/INDEX/SCHEMA/DATABASE/SYSTEM) run via the Maintenance
dialog with "Concurrently" checked fails outright with a syntax error,
making the feature unusable from the UI. Workaround: run the corrected SQL
manually in the Query Tool.
Screenshot

Bug report
pgAdmin version: 9.17
PostgreSQL version: 13.2
OS: Ubuntu 24.04.4 LTS
Description
Running REINDEX TABLE with the "Concurrently" option enabled from the
Maintenance dialog generates invalid SQL.
CONCURRENTLYis placed insidethe parenthesized option list alongside
VERBOSE, but PostgreSQL onlyaccepts
CONCURRENTLYas a standalone keyword placed between the targettype and the target name — not as a parenthesized option.
Steps to reproduce
public."Command") → Maintenance...Generated SQL (invalid)
sql REINDEX (VERBOSE, CONCURRENTLY) TABLE public."Command"; Error
ERROR: syntax error at or near "CONCURRENTLY" LINE 1: REINDEX (VERBOSE, CONCURRENTLY) TABLE public."Command"; ^ Expected SQL
sql REINDEX (VERBOSE) TABLE CONCURRENTLY public."Command"; Root cause (from source)
In
web/pgadmin/tools/maintenance/templates/maintenance/sql/command.sql,CONCURRENTLYis appended to the samemaintenance_optionslist asVERBOSE/TABLESPACE/etc., and the whole list is rendered inside a single(...)clause before the target type/name. Per the PostgreSQL grammar,CONCURRENTLYis not a parenthesizable REINDEX option — it must appearafter the object type keyword (
TABLE/INDEX/SCHEMA/...) and before theobject name. The template needs to emit
CONCURRENTLYthere instead ofinside the options parens.
Impact
Any REINDEX (TABLE/INDEX/SCHEMA/DATABASE/SYSTEM) run via the Maintenance
dialog with "Concurrently" checked fails outright with a syntax error,
making the feature unusable from the UI. Workaround: run the corrected SQL
manually in the Query Tool.
Screenshot