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: