Skip site navigation (1) Skip section navigation (2)

Re: log_hostname and pg_stat_activity

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Steve Singer <ssinger_pg(at)sympatico(dot)ca>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: log_hostname and pg_stat_activity
Date: 2011-02-01 18:33:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Tue, Feb 1, 2011 at 1:09 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On tis, 2011-01-18 at 19:24 -0500, Steve Singer wrote:
>> However if I connect with a line in pg_hba that matches on an IP
>> network then my client_hostname is always null unless log_hostname is
>> set to true.  This is consistent with the behavior you describe but I
>> think the average user will find it a bit confusing.  Having a column
>> that is always null unless a GUC is set is less than ideal but I
>> understand why log_hostname isn't on by default.
> Well, we have all these track_* variables, which also control what
> appears in the statistics views.
> After thinking about this some more, I think it might be better to be
> less cute and forget about the interaction with the pg_hba.conf hostname
> behavior.  That is, the host name is set if and only if log_hostname is
> on.

+1 for doing it that way.

Robert Haas
The Enterprise PostgreSQL Company

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2011-02-01 18:35:13
Subject: Re: Spread checkpoint sync
Previous:From: Robert HaasDate: 2011-02-01 18:32:28
Subject: Re: Spread checkpoint sync

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group