diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c
index bc01f07..dc8e592 100644
--- a/contrib/pgbench/pgbench.c
+++ b/contrib/pgbench/pgbench.c
@@ -162,6 +162,7 @@ char	   *index_tablespace = NULL;
 
 bool		use_log;			/* log transaction latencies to a file */
 bool		use_quiet;			/* quiet logging onto stderr */
+bool		ignore_errors;			/* ignore SQL errors from transactions */
 int			agg_interval;		/* log aggregates instead of individual transactions */
 bool		is_connect;			/* establish connection for each transaction */
 bool		is_latencies;		/* report per-command latencies */
@@ -345,6 +346,7 @@ usage(void)
 		   "  -C           establish new connection for each transaction\n"
 		   "  -D VARNAME=VALUE\n"
 		   "               define variable for use by custom script\n"
+		   "  -e           ignore errors from transactions\n"
 		   "  -f FILENAME  read transaction script from FILENAME\n"
 		   "  -j NUM       number of threads (default: 1)\n"
 		   "  -l           write transaction times to log file\n"
@@ -1040,6 +1042,8 @@ top:
 				case PGRES_TUPLES_OK:
 					break;		/* OK */
 				default:
+					if (ignore_errors)
+						break;
 					fprintf(stderr, "Client %d aborted in state %d: %s",
 							st->id, st->state, PQerrorMessage(st->con));
 					PQclear(res);
@@ -2152,7 +2156,7 @@ main(int argc, char **argv)
 	state = (CState *) pg_malloc(sizeof(CState));
 	memset(state, 0, sizeof(CState));
 
-	while ((c = getopt_long(argc, argv, "ih:nvp:dqSNc:j:Crs:t:T:U:lf:D:F:M:", long_options, &optindex)) != -1)
+	while ((c = getopt_long(argc, argv, "ih:nvp:dqSNc:j:Crs:t:T:U:lef:D:F:M:", long_options, &optindex)) != -1)
 	{
 		switch (c)
 		{
@@ -2263,6 +2267,9 @@ main(int argc, char **argv)
 			case 'q':
 				use_quiet = true;
 				break;
+			case 'e':
+				ignore_errors = true;
+				break;
 			case 'f':
 				ttype = 3;
 				filename = pg_strdup(optarg);
