Skip to content

Commit 4162f91

Browse files
committed
pgbench: Remove dead code
doConnect() never returns connections in state CONNECTION_BAD, so checking for that is pointless. Remove the code that does. This code has been dead since ba708ea, 20 years ago. Discussion: https://postgr.es/m/20210126195224.GA20361@alvherre.pgsql Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
1 parent bcae842 commit 4162f91

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/bin/pgbench/pgbench.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3911,14 +3911,6 @@ main(int argc, char **argv)
39113911
if (con == NULL)
39123912
exit(1);
39133913

3914-
if (PQstatus(con) == CONNECTION_BAD)
3915-
{
3916-
fprintf(stderr, "connection to database \"%s\" failed\n",
3917-
PQdb(con) ? PQdb(con) : "");
3918-
fprintf(stderr, "%s", PQerrorMessage(con));
3919-
exit(1);
3920-
}
3921-
39223914
if (internal_script_used)
39233915
{
39243916
/*

0 commit comments

Comments
 (0)