Hi,
I have postgres 12 running in centos7.
I recently have configured streaming replication from master to standby using below command:
/usr/bin/pg_basebackup -h <master ip> -p 5432 -U replication -D /path/of/data/directory/ -Fp -R -Xs -P -c fast
It was successfully configured but when I query pg_stat_replication I don't get the hostname in output:
postgres=# select * from pg_stat_Replication;
-[ RECORD 1 ]----+------------------------------
pid | 3692075
usesysid | 16384
usename | replication
application_name | walreceiver
client_addr | slave_ip
-[ RECORD 1 ]----+------------------------------
pid | 3692075
usesysid | 16384
usename | replication
application_name | walreceiver
client_addr | slave_ip
client_hostname |
client_port | 52500
backend_start | 2023-11-01 08:26:45.373297-07
backend_xmin |
state | streaming
sent_lsn | 2E5/400001C0
write_lsn | 2E5/400001C0
flush_lsn | 2E5/400001C0
replay_lsn | 2E5/400001C0
write_lag |
flush_lag |
replay_lag |
sync_priority | 0
sync_state | async
reply_time | 2023-11-01 08:41:47.60122-07
client_port | 52500
backend_start | 2023-11-01 08:26:45.373297-07
backend_xmin |
state | streaming
sent_lsn | 2E5/400001C0
write_lsn | 2E5/400001C0
flush_lsn | 2E5/400001C0
replay_lsn | 2E5/400001C0
write_lag |
flush_lag |
replay_lag |
sync_priority | 0
sync_state | async
reply_time | 2023-11-01 08:41:47.60122-07
So please help me understand the reason for this and how I will fix this issue of having a respective hostname in this catalog.
Regards,
Atul