Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant connect to remote postgresql server #14

Open
juarezr opened this issue Oct 25, 2019 · 1 comment
Open

Cant connect to remote postgresql server #14

juarezr opened this issue Oct 25, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@juarezr
Copy link

juarezr commented Oct 25, 2019

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
@sj14 sj14 added the enhancement New feature or request label Oct 26, 2019
@sj14
Copy link
Owner

sj14 commented Oct 26, 2019

Thanks for opening the ticket. You are right, this should be possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants