Re: our checks for read-only queries are not great
От | Tom Lane |
---|---|
Тема | Re: our checks for read-only queries are not great |
Дата | |
Msg-id | 26872.1578515199@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: our checks for read-only queries are not great (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: our checks for read-only queries are not great
|
Список | pgsql-hackers |
Robert Haas <robertmhaas@gmail.com> writes: > On Wed, Jan 8, 2020 at 2:57 PM Tom Lane <tgl@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
В списке pgsql-hackers по дате отправления: