Simon Riggs <si...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers