model-writtenrun 5982 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Oct - Nov 2021 ยท 11 entries
- Jeff Davis proposed pg_maintenance to let non-superusers run VACUUM, ANALYZE and CHECKPOINT, motivated particularly by database-wide maintenance and performance testing #1 #6.
- Reviewers disagreed about grouping maintenance operations: David G. Johnston distinguished routine VACUUM and ANALYZE from disruptive operations, Nathan Bossart considered broader maintenance privileges, and Stephen Frost questioned the database-wide use case and overly general role name #3 #5 #10.
- After Jeff emphasized CHECKPOINT following test data loads, Alvaro Herrera suggested pg_checkpointer, and Jeff narrowed the patch to that single command, dropping VACUUM and ANALYZE #12 #13 #15.
- Nathan Bossart and Stephen Frost preferred a grantable function over a role for one command, while Bharath Rupireddy and Jeff argued for preserving the established CHECKPOINT syntax #16 #19 #22 #23.
- Stephen proposed preserving CHECKPOINT syntax by invoking a function with normal privilege checks, and Jeff implemented pg_checkpoint() with EXECUTE grants controlling both entry points #26 #31.
- Nathan found compilation warnings and questioned the permission error, Stephen suggested a clearer hint, and Daniel Gustafsson supplied an inline header-and-return fix; Jeff incorporated those changes while retaining CheckPointStmt to preserve the command tag #33 #34 #35 #41 #43.
- Alternative permission designs remained exploratory: Vik Fearing proposed table-level grants and a CHECKPOINT role attribute, while Isaac Morland explained privilege-bit constraints and the scalability problem of adding role attributes #36 #38 #39 #40.
- Robert Haas objected to using function ACLs as a general command-permission mechanism, and Andres Freund objected to making CHECKPOINT depend on additional catalogs; Robert illustrated the risk with pg_proc corruption preventing a recovery checkpoint #44 #46 #51.
- Andres proposed granting privileges directly on commands, but Jeff and Alvaro questioned the infrastructure cost for a short list of suitable commands, and Robert favored returning to the predefined role #47 #48 #50 #53.
- Stephen argued that a superuser fast path could preserve CHECKPOINT's existing catalog dependencies, but accepted the predefined role as a practical consensus; Jeff then restored the earlier role patch with a rebase and additional documentation #56 #61 #64.
- The thread ends with Stephen's favorable review requesting precise privilege wording and confirming that has_privs_of_role() preserves the existing superuser path #65; Jeff subsequently committed the final role patch with those wording fixes, documentation links and an updated catalog version as 4168a47454, leaving the broader VACUUM/ANALYZE proposal and function-based alternative out of the committed change.