Re: [HACKERS] ERRCODE_READ_ONLY_SQL_TRANSACTION

2012-01-13 Thread Simon Riggs
On Fri, Jan 13, 2012 at 8:55 AM, Dimitri Fontaine wrote: > I felt that we were missing something simple here, but after review I > think we finally have all the pieces to achieve that with current 9.2 > code base in fact. Good, patch revoked. No time wasted, it was worth checking. --  Simon Ri

Re: [HACKERS] ERRCODE_READ_ONLY_SQL_TRANSACTION

2012-01-13 Thread Dimitri Fontaine
Hi, Tom Lane writes: > Simon Riggs writes: >> Hot Standby returns ERRCODE_READ_ONLY_SQL_TRANSACTION in most cases >> for illegal actions on a standby. > > 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 (

Re: [HACKERS] ERRCODE_READ_ONLY_SQL_TRANSACTION

2012-01-12 Thread Tom Lane
Simon Riggs 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 mo

[HACKERS] ERRCODE_READ_ONLY_SQL_TRANSACTION

2012-01-12 Thread Simon Riggs
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