Re: Allowing REINDEX to have an optional name
Justin Pryzby <pryzby@telsasoft.com>
From: Justin Pryzby <pryzby@telsasoft.com>
To: Simon Riggs <simon.riggs@enterprisedb.com>
Cc: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, pgsql-hackers@postgresql.org
Date: 2022-06-28T00:18:07Z
Lists: pgsql-hackers
Maybe the answer is to 1) add a parenthesized option REINDEX(SYSTEM) (to allow the current behavior); and 2) make REINDEX DATABASE an alias which implies "SYSTEM false"; 3) prohibit REINDEX (SYSTEM true) SYSTEM, or consider removing "REINDEX SYSTEM;". That avoids the opaque and surprising behavior that "REINDEX DATABASE" skips system stuff but "REINDEX DATABASE foo" doesn't, while allowing the old behavior (disabled by default).
Commits
-
Tweak a bit the new TAP tests of REINDEX DATABASE/SYSTEM
- 2b99ce10c2bc 16.0 landed
-
Rework logic and simplify syntax of REINDEX DATABASE/SYSTEM
- 2cbc3c17a5c1 16.0 landed
-
Add more tests for REINDEX DATABASE/SYSTEM with relfilenode changes
- 5fb5b6c4c176 16.0 landed