How to capture client host name in postgresql? pg_stat_activity system view has client_address and client_hostname, but it always empty or null. Do I need to tweak anything to update the view?
You need to set log_hostname to on in postgresql.conf