Skip to content

Commit e55d964

Browse files
committed
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 12788ae. Report by Pavan Deolasee. Patch by Fabien Coelho. Reviewed by Pavan Deolasee. Discussion: http://postgr.es/m/CABOikdPhfXTypckMC1Ux6Ko+hKBWwUBA=EXsvamXYSg8M9J94w@mail.gmail.com
1 parent 2a14b96 commit e55d964

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/bin/pgbench/pgbench.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2194,12 +2194,8 @@ doCustom(TState *thread, CState *st, StatsData *agg)
21942194
{
21952195
if (!sendCommand(st, command))
21962196
{
2197-
/*
2198-
* Failed. Stay in CSTATE_START_COMMAND state, to
2199-
* retry. ??? What the point or retrying? Should
2200-
* rather abort?
2201-
*/
2202-
return;
2197+
commandFailed(st, "SQL command send failed");
2198+
st->state = CSTATE_ABORTED;
22032199
}
22042200
else
22052201
st->state = CSTATE_WAIT_RESULT;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy