Re: Resolving host to IP address

From: Sebastien Flaesch <sebastien(dot)flaesch(at)4js(dot)com>
To: Francisco Olarte <folarte(at)peoplecall(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Resolving host to IP address
Date: 2022-09-12 14:40:16
Message-ID: DBAP191MB12890A6FA5548EA02B35565CB0449@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you all for your comments.

I think I got it: PostgreSQL should listen to the real, non-loopback network interface.

Just for info (local dev config, not prod):

sf(at)toro:/opt3/dbs/pgs/14.1-openssl/data$ grep listen_addresses postgresql.conf

listen_addresses = 'localhost,toro.strasbourg.4js.com'

sf(at)toro:/opt3/dbs/pgs/14.1-openssl/data$ netstat -tl -W | grep 5437
tcp 0 0 localhost:5437 0.0.0.0:* LISTEN
tcp 0 0 toro.strasbourg.4js.com:5437 0.0.0.0:* LISTEN
tcp6 0 0 localhost:5437 [::]:* LISTEN

sf(at)toro:/opt3/dbs/pgs/14.1-openssl/data$ netstat -tl -W --numeric-hosts | grep 5437
tcp 0 0 127.0.0.1:5437 0.0.0.0:* LISTEN
tcp 0 0 127.0.1.1:5437 0.0.0.0:* LISTEN
tcp6 0 0 ::1:5437 :::* LISTEN

sf(at)toro:/opt3/dbs/pgs/14.1-openssl/data$ ip route get 127.0.1.1
local 127.0.1.1 dev lo src 127.0.0.1 uid 1000
cache <local>

Seb

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2022-09-12 15:00:13 Re: Support for dates before 4713 BC
Previous Message Simon Riggs 2022-09-12 14:40:09 Re: Support for dates before 4713 BC