On Thursday 09 March 2017 12:08:01 Tom Lane wrote: > John Iliffe <john.iliffe@xxxxxxxxx> writes: > > Here is my matching ss output > > > > ------------------------------ > > [root@prod04 John]# ss -l -p | grep post > > u_str LISTEN 0 128 /tmp/.s.PGSQL.5432 69422 > > * 0 users:(("postgres",pid=2760,fd=5)) > > tcp LISTEN 0 128 127.0.0.1:postgres *:* > > users:(("postgres",pid=2760,fd=4)) > > tcp LISTEN 0 128 ::1:postgres :::* > > users:(("postgres",pid=2760,fd=3)) > > [root@prod04 John]# > > --------------------------------- > > Well, that's absolutely fascinating, because it proves that your > postmaster (PID 2760) *did* successfully bind to the IPv4 port, > along with IPv6 and Unix socket too. > > So now we're left with the question of why you got this bleat > > along the way: > > [postgres@prod04 pgsql_tablespaces]$ LOG: could not bind IPv4 socket: > > Cannot assign requested address > > AFAICS, the explanation must be that getaddrinfo() returned two IPv4 > addresses, one of which got bound successfully and the other not. > The bleat is about the non-working address, but you still ended up > with a working IPv4 socket. > > This recalls my earlier theory that there's something weird about > your networking configuration, but now we have a bit more information > about what the weirdness must look like. It might be useful to have > a look at "ifconfig" output on your machine. > --------------------------------------------- [root@prod04 John]# ifconfig -a enp0s31f6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.6 netmask 255.255.255.255 broadcast 192.168.1.6 inet6 fe80::62d4:f478:8bbb:34a1 prefixlen 64 scopeid 0x20<link> ether 38:d5:47:19:0d:cb txqueuelen 1000 (Ethernet) RX packets 105284 bytes 128902991 (122.9 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 54500 bytes 5397679 (5.1 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 16 memory 0xf7000000-f7020000 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1 (Local Loopback) RX packets 7678 bytes 2703160 (2.5 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 7678 bytes 2703160 (2.5 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 --------------------------------------------- > Also, are you setting "listen_addresses" to something non-default? > No, I made no change to the default listen address in postgresql.conf. In fact it is commented out. [root@prod04 John]# cat /usr/pgsql_tablespaces/postgresql.conf | grep listen #listen_addresses = 'localhost' # what IP address(es) to listen on; > > Referring back to an earlier post, I changed the location for the > > domain socket and lock file from /tmp to /var/run/postgres in the > > postgresql.conf file and set the permissions so postgres could run. > > Now psql complains that the domain socket is not present. There > > doesn't seem to be a config entry or file for psql. What did I miss? > > Um ... that we were guessing that you were using a Red-Hat-supplied > libpq.so that expected the socket to be in /var/run/postgres. > Evidently that's not the case. > No, everything for Postgresql was installed as a separate downloaded package from the PGSQL web site. > (I will complain that you're still being absolutely terrible about > reporting error messages precisely. I do not want to see you say again > that "program X complains something". Please *copy and paste the exact > error message* from now on. Even if the details don't seem significant > to you, they may be to us.) > My sincere apologies for this. I appreciate the assistance and the time that you and Adrian have spent so far. > regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general