Reputation: 21
During my migration from PostgreSQL 11 to PostgreSQL 14 using pg_upgrade, I encountered an issue while attempting to restore schemas, functions, and views. In PostgreSQL 11, I had created a view in the public schema and subsequently altered it to the pg_catalog schema. However, during the pg_restore process, I received an error message indicating that "system catalog modifications are currently disallowed."
To address this error, I explored two potential solutions:
Modifying the rolcatupdate column in the pg_roles catalog, which I found to be obsolete in PostgreSQL versions 9.x and later. Enabling the allow_system_table_mods setting to allow modifications to the structure of system tables and other potentially risky actions. I came across the documentation for allow_system_table_mods, which states that it permits these modifications but warns of the potential for data loss or database corruption if used incorrectly. It's noted that only superusers have the authority to change this setting.
Based on my testing, I found that enabling allow_system_table_mods resolved the issue. However, I'm seeking advice on whether it's advisable to use this setting during the pg_upgrade process.
Upvotes: 0
Views: 148