Re: missing client_hostname

From: Atul Kumar <akumar14871(at)gmail(dot)com>
To: Mateusz Henicz <mateuszhenicz(at)gmail(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: missing client_hostname
Date: 2023-11-01 19:00:54
Message-ID: CA+ONtZ5yefF6qnhMG4cqPd7c-uRokUK=EwPNuWY3cUy6-9hFgQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Yes, I have already tried that as log_hostname was already enabled by me.

By the way, just to inform you that the log_hostname is used for logging
the hostname instead of ip addresses in error log files only, Please
correct me if I am wrong.

Could you help me in telling my query that Iasked in my trial mail:

"Do you think that just because I use ip_address instead of hostname while
using pg_basebackup on standby side could be the reason for not showing
client_hostname in pg_stat_replication ?" I used below command in standby
node:

/usr/bin/pg_basebackup -h <master ip> -p 5432 -U replication -D
/path/of/data/directory/ -Fp -R -Xs -P -c fast

Regards.

On Wed, Nov 1, 2023 at 11:46 PM Mateusz Henicz <mateuszhenicz(at)gmail(dot)com>
wrote:

> Did you reconnect your replica after enabling log_hostname? If not, then
> do it and check again.
>
> śr., 1 lis 2023, 19:03 użytkownik Atul Kumar <akumar14871(at)gmail(dot)com>
> napisał:
>
>> I have already enabled log_hostname, still *client_hostname is not
>> showing up.*
>>
>> Do you think that just because I use ip instead of hostname while using
>> pg_basebackup could be the reason for it ?
>>
>>
>>
>>
>> Regards,
>> Atul
>>
>> On Wed, Nov 1, 2023 at 11:23 PM Christoph Moench-Tegeder <
>> cmt(at)burggraben(dot)net> wrote:
>>
>>> ## Atul Kumar (akumar14871(at)gmail(dot)com):
>>>
>>> > It was successfully configured but when I query pg_stat_replication I
>>> don't
>>> > get the hostname in output:
>>>
>>> I Recommend The Fine Manual:
>>>
>>> https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-REPLICATION-VIEW
>>> "... and only when log_hostname is enabled".
>>>
>>> Regards,
>>> Christoph
>>>
>>> --
>>> Spare Space
>>>
>>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christoph Moench-Tegeder 2023-11-01 19:46:25 Re: missing client_hostname
Previous Message Mateusz Henicz 2023-11-01 18:16:00 Re: missing client_hostname