Skip to content

Commit 6eff0ac

Browse files
committed
Doc: improve discussion of reverse+forward host name lookup in pg_hba.conf.
Fix some grammatical issues and make it a bit more readable.
1 parent cfe992e commit 6eff0ac

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

doc/src/sgml/client-auth.sgml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable>
275275

276276
<para>
277277
If a host name is specified (anything that is not an IP address
278-
or a special key word is processed as a potential host name),
278+
or a special key word is treated as a host name),
279279
that name is compared with the result of a reverse name
280280
resolution of the client's IP address (e.g., reverse DNS
281281
lookup, if DNS is used). Host name comparisons are case
@@ -310,22 +310,28 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable>
310310
the client's host name instead of the IP address in the log.
311311
</para>
312312

313+
<para>
314+
This field only applies to <literal>host</literal>,
315+
<literal>hostssl</literal>, and <literal>hostnossl</> records.
316+
</para>
317+
313318
<sidebar>
314319
<para>
315-
Occasionally, users have wondered why host names are handled
316-
in this seemingly complicated way with two name resolutions
317-
and requiring reverse lookup of IP addresses, which is
318-
sometimes not set up or points to some undesirable host name.
319-
It is primarily for efficiency: A connection attempt requires
320-
two resolver lookups of the current client's address. If
321-
there is resolver problem with that address, it becomes only
320+
Users sometimes wonder why host names are handled
321+
in this seemingly complicated way, with two name resolutions
322+
including a reverse lookup of the client's IP address. This
323+
complicates use of the feature in case the client's reverse DNS
324+
entry is not set up or yields some undesirable host name.
325+
It is done primarily for efficiency: this way, a connection attempt
326+
requires at most two resolver lookups, one reverse and one forward.
327+
If there is a resolver problem with some address, it becomes only
322328
that client's problem. A hypothetical alternative
323-
implementation which only does forward lookups would have to
329+
implementation that only did forward lookups would have to
324330
resolve every host name mentioned in
325-
<filename>pg_hba.conf</filename> at every connection attempt.
326-
That would already be slow by itself. And if there is a
327-
resolver problem with one of the host names, it becomes
328-
everyone's problem.
331+
<filename>pg_hba.conf</filename> during every connection attempt.
332+
That could be quite slow if many names are listed.
333+
And if there is a resolver problem with one of the host names,
334+
it becomes everyone's problem.
329335
</para>
330336

331337
<para>
@@ -340,11 +346,6 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable>
340346
Apache HTTP Server and TCP Wrappers.
341347
</para>
342348
</sidebar>
343-
344-
<para>
345-
This field only applies to <literal>host</literal>,
346-
<literal>hostssl</literal>, and <literal>hostnossl</> records.
347-
</para>
348349
</listitem>
349350
</varlistentry>
350351

0 commit comments

Comments
 (0)