comparison src/postgres.sml @ 1550:daf71c76707e

Postgres deadlock triggers unlimited retry
author Adam Chlipala <adam@chlipala.net>
date Sun, 28 Aug 2011 14:01:41 -0400
parents 969b90b1f2f9
children da11f7b18067
comparison
equal deleted inserted replaced
1549:355a928871ff 1550:daf71c76707e
752 newline, 752 newline,
753 string "uw_error(ctx, UNLIMITED_RETRY, \"Serialization failure\");", 753 string "uw_error(ctx, UNLIMITED_RETRY, \"Serialization failure\");",
754 newline], 754 newline],
755 string "}", 755 string "}",
756 newline, 756 newline,
757 string "if (!strcmp(PQresultErrorField(res, PG_DIAG_SQLSTATE), \"40P01\")) {",
758 box [newline,
759 string "PQclear(res);",
760 newline,
761 string "uw_error(ctx, UNLIMITED_RETRY, \"Deadlock detected\");",
762 newline],
763 string "}",
764 newline,
757 case mode of 765 case mode of
758 Settings.Error => box [string "PQclear(res);", 766 Settings.Error => box [string "PQclear(res);",
759 newline, 767 newline,
760 string "uw_error(ctx, FATAL, \"", 768 string "uw_error(ctx, FATAL, \"",
761 string (ErrorMsg.spanToString loc), 769 string (ErrorMsg.spanToString loc),