On Fri, 2025-06-13 at 13:38 +0530, Vaibhav Dalvi wrote: > I'm writing to share an observation regarding `pg_catalog` system objects > and their privileges during `pg_upgrade`. It's known that `pg_catalog` > system objects are not dumped, but their privileges are. However, > if user-created objects are placed within `pg_catalog` and their privileges > are altered, `pg_upgrade` can fail with an "object does not exist" error.
It is not supported to create objects in pg_catalog. Don't do it. > I believe one of the following approaches should be considered to prevent > such failures: > > 1. Restrict the creation of user objects within the `pg_catalog` schema. That's already the case: test=# CREATE TABLE pg_catalog.new (); ERROR: permission denied to create "pg_catalog.new" DETAIL: System catalog modifications are currently disallowed. Yours, Laurenz Albe