Allowing REINDEX to have an optional name
Simon Riggs <simon.riggs@enterprisedb.com>
From: Simon Riggs <simon.riggs@enterprisedb.com>
To: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2022-05-10T09:13:13Z
Lists: pgsql-hackers
Attachments
- reindex_not_require_database_name.v2.patch (application/octet-stream) patch v2
A minor issue, and patch. REINDEX DATABASE currently requires you to write REINDEX DATABASE dbname, which makes this a little less usable than we might like. REINDEX on the catalog can cause deadlocks, which also makes REINDEX DATABASE not much use in practice, and is the reason there is no test for REINDEX DATABASE. Another reason why it is a little less usable than we might like. Seems we should do something about these historic issues in the name of product usability. Attached patch allows new syntax for REINDEX DATABASE, without needing to specify dbname. That version of the command skips catalog tables, as a way of avoiding the known deadlocks. Patch also adds a test. -- Simon Riggs http://www.EnterpriseDB.com/
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