Skip to content

Cant connect to remote postgresql server #14

Description

@juarezr

There is no option to specify the database name for connectiong with a remote postgresql server:

$ dbbench postgres --host "172.24.1.63/mydbname" --port 5439 --user my_user --pass my_password  --iter 10 --threads 2 --conns 2 --sleep 5s --script website-benchmark.sql
2019/10/25 19:13:15 failed to ping db: dial tcp: lookup 172.24.1.63/mydbname: no such host

$ dbbench postgres --host 172.24.1.63 --port 5439 --user my_user --pass my_password  --iter 10 --threads 2 --conns 2 --sleep 5s --script website-benchmark.sql
2019/10/25 19:13:27 failed to ping db: pq: database "my_user" does not exist

Notice that also ping is disabled by network admin:

$ ping 172.24.1.63
PING 172.24.1.63 (172.24.1.63) 56(84) bytes of data.
^C
--- 172.24.1.63 ping statistics ---
10 packets transmitted, 0 received, 100% packet loss, time 9224ms

What I missed is some command line options:

  1. --no-ping flag for skipping ping connection test
  2. --connectionoption for connecting using go pg connectionstring directly and also could be used instead of --host --port --user --pass

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions