Cursory observations below...
Hi Guys;Can I please get some assistance:I have postgres server running on the localhost:-bash-4.2$ telnet localhost 5432Trying ::1...Connected to localhost.Escape character is '^]'.-bash-4.2$ psql -U postgrespsql (9.4.4)Type "help" for help.
You are connecting to a unix socket and not a TCP/IP port...
postgres=# \listList of databasesName | Owner | Encoding | Collate | Ctype | Access privileges-----------+----------+----------+-------------+-------------+-----------------------postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +| | | | | postgres=CTc/postgrestemplate1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +| | | | | postgres=CTc/postgrestest | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |(4 rows)pgbouncer.ini:[databases]template1 = host=127.0.0.1 port=5432 dbname=template1
haven't proved PostgreSQL is listening on 127.0.0.1:5432 yet; only proved it is listing on the local unix socket...
[pgbouncer]listen_port = 6432listen_addr = 127.0.0.1auth_type = trustauth_file = /etc/pgbouncer/userslist.txtlogfile = /var/log/pgbouncer.logpidfile = /var/run/pgbouncer/pgbouncer.pidadmin_users = postgres-bash-4.2$ telnet localhost 6432Trying ::1...telnet: connect to address ::1: Connection refusedTrying 127.0.0.1...Connected to localhost.Escape character is '^]'.
Listening on a tcp/ip port...(ip4 only)
2015-07-06 15:02:00.233 11993 DEBUG C-0x2549910: (nodb)/(nouser)@127.0.0.1:44274 P: got connection: 127.0.0.1:44274 -> 127.0.0.1:6432But here is the weird thing:When I try to run:-bash-4.2$ psql -p 6432 pgbouncer
...but attempting to connect to a unix socket
psql: could not connect to server: No such file or directoryIs the server running locally and acceptingconnections on Unix domain socket "/var/run/postgresql/.s.PGSQL.6432"?Please tell me what Im doing wrong?
Try specifying "--host=localhost" or "--host=127.0.0.1"
And another question, if I want to specify remote postgres DB's in the .ini file. How do I do that?
[databases]
name = host=remote_ip_address etc...
David J.