diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c index 5c9bd96..715e231 100644 *** a/src/bin/psql/common.c --- b/src/bin/psql/common.c *************** *** 740,746 **** ProcessResult(PGresult **results) } while (next_result); /* may need this to recover from conn loss during COPY */ ! if (!CheckConnection()) return false; return success; --- 740,746 ---- } while (next_result); /* may need this to recover from conn loss during COPY */ ! if (!first_cycle && !CheckConnection()) return false; return success; *************** *** 1015,1022 **** SendQuery(const char *query) case PQTRANS_UNKNOWN: default: OK = false; ! psql_error("unexpected transaction status (%d)\n", ! transaction_status); break; } --- 1015,1024 ---- case PQTRANS_UNKNOWN: default: OK = false; ! /* PQTRANS_UNKNOWN is expected given a broken connection. */ ! if (transaction_status != PQTRANS_UNKNOWN || ConnectionUp()) ! psql_error("unexpected transaction status (%d)\n", ! transaction_status); break; }