Peter Eisentraut <peter.eisentr...@2ndquadrant.com> writes: > I don't really remember, but that was basically the opinion I had > arrived at as I was reading through this current thread. Roughly > speaking, anything that changes the database state (data or schema) in a > way that would be reflected in a pg_dump output is not read-only.
OK, although I'd put some emphasis on "roughly speaking". > ALTER SYSTEM is read only in my mind. I'm still having trouble with this conclusion. I think it can only be justified by a very narrow reading of "reflected in pg_dump" that relies on the specific factorization we've chosen for upgrade operations, ie that postgresql.conf mods have to be carried across by hand. But that's mostly historical baggage, rather than a sane basis for defining "read only". If somebody comes up with a patch that causes "pg_dumpall -g" to include ALTER SYSTEM SET commands for whatever is in postgresql.auto.conf (not an unreasonable idea BTW), will you then decide that ALTER SYSTEM SET is no longer read-only? Or, perhaps, reject such a patch on the grounds that it breaks this arbitrary definition of read-only-ness? As another example, do we need to consider that replacing pg_hba.conf via pg_write_file should be allowed in a "read only" transaction? These conclusions seem obviously silly to me, but perhaps YMMV. regards, tom lane