model-writtenrun 9425 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Michael Paquier demonstrated that pg_dumpall could emit a dependent tablespace GRANT before its prerequisite WITH GRANT OPTION, causing restoration to fail, and supplied a patch preserving ACL order in #1.
- Michael Paquier also proposed sharing buildACLQueries() across object types, while Nathan Bossart approved the patch and traced the pg_init_privs limitations to dropping and recreating template databases in #2.
- The patch from #1 landed unchanged as 156c0c2dff, with backpatches through PostgreSQL 9.6; Michael Paquier confirmed the conflict-free application in #3.
- After committing, Michael Paquier questioned why recreated template databases could not receive fresh initial-privilege entries and raised the lack of a shared pg_init_privs catalog in #3.
- Stephen Frost explained that dumps must retain knowledge of initdb-time database privileges and suggested a buildACLQueries() flag for tablespaces without initial privileges in #4; the ordering fix was complete, while broader ACL-query consolidation and database handling remained unresolved.