aboutsummaryrefslogtreecommitdiff
path: root/src
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
commit6819b9042fe69154ff3fd2337c5028038d3cfab4 (patch)
tree23caaa1c76f87aab5512b009ce64483f66f1c460 /src
parentb034ef9b376dbe712caa076541d6a750f37d85ce (diff)
downloadpostgresql-6819b9042fe69154ff3fd2337c5028038d3cfab4.tar.gz
postgresql-6819b9042fe69154ff3fd2337c5028038d3cfab4.zip
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>
Diffstat (limited to 'src')
-rw-r--r--src/bin/pgbench/pgbench.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index 1be1ad3d6d9..a4a3f40048e 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -6040,13 +6040,6 @@ main(int argc, char **argv)
if (con == NULL)
exit(1);
- if (PQstatus(con) == CONNECTION_BAD)
- {
- pg_log_fatal("connection to database \"%s\" failed: %s",
- dbName, PQerrorMessage(con));
- exit(1);
- }
-
if (internal_script_used)
GetTableInfo(con, scale_given);