Are dns CNAME's allowed or useable in pg_hba.conf hostname specification

From: "dennisr(at)visi(dot)com" <dennisr(at)visi(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Are dns CNAME's allowed or useable in pg_hba.conf hostname specification
Date: 2016-12-05 21:49:26
Message-ID: 712E05C9-E2D7-49CD-834E-26BA911C8D8A@visi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

From reading the doc’s it looks like a CNAME will not in general work as a hostname specification in pg_hba.conf. Is that a correct interpretation of the the documentation?

From the doc’s (https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html

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.)

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Whitney 2016-12-05 21:56:40 Re: Are dns CNAME's allowed or useable in pg_hba.conf hostname specification
Previous Message John Scalia 2016-12-05 20:51:02 Re: Req. for some help with resolving the error "pg_basebackup: could not get WAL end position from server: FATAL: requested WAL segment"