Search code examples
postgresqldatabase-metadata

Do system table modifications pass through replication?


I am currently patching a Postgres 9.6 database.

As part of the patch I'm required to make changes to the system tables, first changing allow_system_table_mods in the config file, then executing the recommended SQL.

If I make this change on a master db, does it get replicated to other slave databases, or do I need to make this change on all DBs round robin ?


Solution

  • You cannot perform modifications on standby servers, as they are read-only.

    Any change to the PostgreSQL cluster will be replicated; the clusters are identical copies of each other. This includes catalog modifications.

    Modifying the catalog is not supported, and you are on your own if you get in trouble. Moreover, any such changes will be lost after a major upgrade.

    You should not do this, except when the release notes tell you to do so after an upgrade (to fix a bug).