Re: ERRCODE_READ_ONLY_SQL_TRANSACTION
От | Tom Lane |
---|---|
Тема | Re: ERRCODE_READ_ONLY_SQL_TRANSACTION |
Дата | |
Msg-id | 17324.1326407588@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | ERRCODE_READ_ONLY_SQL_TRANSACTION (Simon Riggs <simon@2ndQuadrant.com>) |
Ответы |
Re: ERRCODE_READ_ONLY_SQL_TRANSACTION
|
Список | pgsql-hackers |
Simon Riggs <simon@2ndQuadrant.com> writes: > Hot Standby returns ERRCODE_READ_ONLY_SQL_TRANSACTION in most cases > for illegal actions on a standby. > There are two possible but not normally seen cases that give errors, > but don't set the correct sqlstate, which makes it difficult to > diagnose misdirected SQL from more normal SQL problems. > *Patch corrects this. Thanks to Dimitri for the report. I don't think I like this patch: you are promoting what are and ought to be very low-level internal sanity checks into user-facing errors (which among other things will require translation effort for the messages). I note that you didn't bother even to adjust the adjacent comments saying this should never happen. What I want to know is what code path led to these and why the read-only ereport did not occur at a far higher level. If we have gaps in the RO checking we should be fixing them somewhere else, not band-aiding here. regards, tom lane
В списке pgsql-hackers по дате отправления: