Hi Hackers,

With the multi host connection string feature, it is possible to specify
multiple
hosts in primary_conninfo that is used in streaming replication to make sure
that WAL streaming is not affected.

Currently there is no information that is available in the standby node to
find out
to which primary currently it is connected. Need to find out from primary
node only.

I feel it may be better if we can enhance the pg_stat_wal_receiver to
display the
connected host information such as "hostname", "hostaddr" and "port". So
that
it is possible to find out the from standby node to which primary currently
it is
connected.

The current connected host details are already available in the PGconn
structure,
Exposing those details in the view will suffice this requirement. Currently
these
members are characters pointers, I used them as it is and displayed them in
the
view as character arrays except the port number.

Attached the draft patch. Any comments?

Regards,
Hari Babu
Fujitsu Australia

Attachment: pg_stat_wal_receiver-to-display-connected-host.patch
Description: Binary data

Reply via email to