From: Tom Lane <tgl@sss.pgh.pa.us>
To: rammohan ganapavarapu <rammohanganap@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: FQDN for replication connection in pg_hba.conf
Date: Tue, 10 Oct 2017 18:17:15 -0400
Message-ID: <32197.1507673835@sss.pgh.pa.us> (raw)
In-Reply-To: <CALm_Vjif_fy2XU-K3nUdQoDoxrzmtHHUZj+=5cpOkcmwc2J8zA@mail.gmail.com>
References: <CALm_Vjif_fy2XU-K3nUdQoDoxrzmtHHUZj+=5cpOkcmwc2J8zA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
rammohan ganapavarapu <rammohanganap@gmail.com> writes:
> Can we use fqdn in pg_hba.conf for replication connections?
Yes, if you're using 9.3 or newer, but note what the manual says:
If a host name is specified (anything that is not an IP address range
or a special key word is treated as a host name), that name is
compared with the result of a reverse name resolution of the client's
IP address (e.g., reverse DNS lookup, if DNS is used). Host name
comparisons are case insensitive. If there is a match, then a forward
name resolution (e.g., forward DNS lookup) is performed on the host
name to check whether any of the addresses it resolves to are equal to
the client's IP address. If both directions match, then the entry is
considered to match. (The host name that is used in pg_hba.conf should
be the one that address-to-name resolution of the client's IP address
returns, otherwise the line won't be matched. Some host name databases
allow associating an IP address with multiple host names, but the
operating system will only return one host name when asked to resolve
an IP address.)
My bet is you don't have reverse DNS set up correctly for that address.
regards, tom lane
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, rammohanganap@gmail.com
Subject: Re: FQDN for replication connection in pg_hba.conf
In-Reply-To: <32197.1507673835@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox