Skip to content

Commit 3055e8d

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 f7f2a28 commit 3055e8d

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
@@ -5408,14 +5408,6 @@ main(int argc, char **argv)
54085408
if (con == NULL)
54095409
exit(1);
54105410

5411-
if (PQstatus(con) == CONNECTION_BAD)
5412-
{
5413-
fprintf(stderr, "connection to database \"%s\" failed\n",
5414-
PQdb(con) ? PQdb(con) : "");
5415-
fprintf(stderr, "%s", PQerrorMessage(con));
5416-
exit(1);
5417-
}
5418-
54195411
if (internal_script_used)
54205412
{
54215413
/*

0 commit comments

Comments
 (0)