Обсуждение: PG 8.0.3 ignores parameter listen_addresses ?
Hi, I compiled a Postgres 8.0.3 on a SuSE 9.3 system. This sytem has several network-interfaces. One points to the wild internet. Now I'd like postgres only to listen for localhost, the LAN and probaply the socket. I wrote listen_addresses = 'localhost,192.168.100.1' in the postgresql.conf restartet the pg-server and looked with netstat -lan |grep 5432. It still showed tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN tcp 0 0 :::5432 :::* LISTEN unix 2 [ ACC ] STREAM LISTEN 65292 /tmp/.s.PGSQL.5432 Uncommenting the listen_addresses = 'localhost' in the default conf-file does the same. Nothing, that is. :( I though that perhaps PG reads some other file but as I changed the port to 5433 in the next parameter below the listen_addresses it worked. Where am I wrong ?
Andreas <maps.on@gmx.net> writes: > I wrote listen_addresses = 'localhost,192.168.100.1' in the > postgresql.conf restartet the pg-server and looked with netstat -lan > |grep 5432. > It still showed > tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN > tcp 0 0 :::5432 :::* LISTEN > unix 2 [ ACC ] STREAM LISTEN 65292 /tmp/.s.PGSQL.5432 I'll bet you have -i on the postmaster command line; that overrides listen_addresses from the config file. regards, tom lane
Tom Lane schrieb: >Andreas <maps.on@gmx.net> writes: > > >>It still showed >>tcp 0 0 :::5432 :::* LISTEN >>unix 2 [ ACC ] STREAM LISTEN 65292 /tmp/.s.PGSQL.5432 >> >> > >I'll bet you have -i on the postmaster command line; that overrides >listen_addresses from the config file. > > Right =8-} Now, to embarass me a bit further, I'd need to ask why netstat now (still) shows : tcp 0 0 ::1:5432 :::* LISTEN That's probaply some IP V6 thingy. I didn't feel the need vor IP V6 until now so I don't have a clue and I'd rather not have stuff listening there.
Andreas <maps.on@gmx.net> writes: > Now, to embarass me a bit further, I'd need to ask why netstat now > (still) shows : > tcp 0 0 ::1:5432 :::* LISTEN > That's probaply some IP V6 thingy. Yup, that's the IPv6 spelling of localhost. > I didn't feel the need vor IP V6 until now so I don't have a clue and > I'd rather not have stuff listening there. You'd have to see about turning off IPv6 support in your kernel then. But since it's only a local loopback connection, I don't entirely see the point of worrying. regards, tom lane