summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2021-01-28 12:50:40 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2021-01-28 12:50:40 -0300
commitcfbbc1f17c24258836662ed6a0f3087c33b90bae (patch)
tree6c831ca1b3c2fa5ff5f2333646ce36902b735533
parentf2dc962360b329c811c5e08eb0de4fb82462cdaf (diff)
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 ba708ea3dc84, 20 years ago. Discussion: https://postgr.es/m/20210126195224.GA20361@alvherre.pgsql Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
-rw-r--r--src/bin/pgbench/pgbench.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index 875b764fa9e..566593cde66 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -3310,14 +3310,6 @@ main(int argc, char **argv)
if (con == NULL)
exit(1);
- if (PQstatus(con) == CONNECTION_BAD)
- {
- fprintf(stderr, "connection to database \"%s\" failed\n",
- PQdb(con) ? PQdb(con) : "");
- fprintf(stderr, "%s", PQerrorMessage(con));
- exit(1);
- }
-
if (ttype != 3)
{
/*