On Mon, Jan 24, 2011 at 12:59 AM, Murray S. Kucherawy <m...@cloudmark.com> wrote: > Well my other suggestion would be to assume PGRES_FATAL_ERROR always means > the connection needs to be reset. But this blows that idea away; this would > cause a connection reset that wouldn't actually solve the problem when it's > an ERROR as you described.
Well, actually it's the other way around: resetting the connection would *work* in the case of an ERROR, but it'd be overkill. Most of the things that can go wrong are ERROR rather than FATAL, and you just issue a ROLLBACK to balance out any BEGIN you previously issued, and then do whatever it is you want to do next. A full connection reset would be pretty expensive in this context and, as you might guess, there are a lot more things that cause ERROR than there are that cause FATAL. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs