Skip to content

Commit 30854d9

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 30f912a commit 30854d9

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
@@ -5676,14 +5676,6 @@ main(int argc, char **argv)
56765676
if (con == NULL)
56775677
exit(1);
56785678

5679-
if (PQstatus(con) == CONNECTION_BAD)
5680-
{
5681-
fprintf(stderr, "connection to database \"%s\" failed\n",
5682-
PQdb(con) ? PQdb(con) : "");
5683-
fprintf(stderr, "%s", PQerrorMessage(con));
5684-
exit(1);
5685-
}
5686-
56875679
if (internal_script_used)
56885680
{
56895681
/*

0 commit comments

Comments
 (0)