Craig Ringer <cr...@2ndquadrant.com> writes: > On 20 March 2017 at 10:26, Dominick O'Dierno <odier...@gmail.com> wrote: >> Essentially I want to determine by the error code if it is worth retrying >> the call (transient) or if the error was due to a bad query or programmer >> error, in which case don't retry.
> In general you'll need classes of retry: > * just reissue the query (deadlock retry, etc) > * reconnect and retry Yeah. There's a pretty significant fraction of these where just blindly repeating the failing query isn't likely to help; the error code is meant to suggest that the DBA has to fix something, eg adjust configuration limits. I'm also pretty dubious about the value of a blind retry for, eg, disk_full. One you missed that I think *is* supposed to imply "just retry" is 40001 serialization_failure. You have to retry the whole transaction though, not just one query. 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