File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -740,7 +740,7 @@ ProcessResult(PGresult **results)
740
740
} while (next_result );
741
741
742
742
/* may need this to recover from conn loss during COPY */
743
- if (!CheckConnection ())
743
+ if (!first_cycle && ! CheckConnection ())
744
744
return false;
745
745
746
746
return success ;
@@ -1015,8 +1015,10 @@ SendQuery(const char *query)
1015
1015
case PQTRANS_UNKNOWN :
1016
1016
default :
1017
1017
OK = false;
1018
- psql_error ("unexpected transaction status (%d)\n" ,
1019
- transaction_status );
1018
+ /* PQTRANS_UNKNOWN is expected given a broken connection. */
1019
+ if (transaction_status != PQTRANS_UNKNOWN || ConnectionUp ())
1020
+ psql_error ("unexpected transaction status (%d)\n" ,
1021
+ transaction_status );
1020
1022
break ;
1021
1023
}
1022
1024
You can’t perform that action at this time.
0 commit comments