Robert Haas <robertmh...@gmail.com> writes: > On Wed, Jan 8, 2020 at 2:57 PM Tom Lane <t...@sss.pgh.pa.us> wrote: >> * I find COMMAND_IS_WEAKLY_READ_ONLY to be a more confusing concept >> than what it replaces. The test for LockStmt is an example --- the >> comment talks about restricting locks during recovery, which is fine and >> understandable, but then it's completely unobvious that the actual code >> implements that behavior rather than some other one.
> Uh, suggestions? COMMAND_NOT_IN_RECOVERY, maybe? >> * ALTER SYSTEM SET is readonly? Say what? > It would be extremely lame and a huge usability regression to > arbitrary restrict ALTER SYSTEM SET on standby nodes for no reason. I didn't say that it shouldn't be allowed on standby nodes. I said it shouldn't be allowed in transactions that have explicitly declared themselves to be read-only. Maybe we need to disaggregate those concepts a bit more --- a refactoring such as this would be a fine time to do that. regards, tom lane