Commit e55d9643 authored by Robert Haas's avatar Robert Haas

pgbench: If we fail to send a command to the server, fail.

This beats the old behavior of busy-waiting hands down.

Oversight in commit 12788ae4.

Report by Pavan Deolasee. Patch by Fabien Coelho.  Reviewed by
Pavan Deolasee.

Discussion: http://postgr.es/m/CABOikdPhfXTypckMC1Ux6Ko+hKBWwUBA=EXsvamXYSg8M9J94w@mail.gmail.com
parent 2a14b960
...@@ -2194,12 +2194,8 @@ doCustom(TState *thread, CState *st, StatsData *agg) ...@@ -2194,12 +2194,8 @@ doCustom(TState *thread, CState *st, StatsData *agg)
{ {
if (!sendCommand(st, command)) if (!sendCommand(st, command))
{ {
/* commandFailed(st, "SQL command send failed");
* Failed. Stay in CSTATE_START_COMMAND state, to st->state = CSTATE_ABORTED;
* retry. ??? What the point or retrying? Should
* rather abort?
*/
return;
} }
else else
st->state = CSTATE_WAIT_RESULT; st->state = CSTATE_WAIT_RESULT;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment