Is there any way to have more than one PostgreSQL slave servers in the same system.
If yes, how come a master detect each server as different slaves from the below query
select * from pg_stat_replication;
will give one row for each slave which are connected to it, with PID, IP-address/client_address, client_port, etc..
If two servers are running in the same machine gives the same IP-address so it is not a unique identifier.
If slave got restarted then both client_port and PID will change so these are also cant be a unique identifier.
So, what is the unique identifier used by Postgres master to identify each slave server uniquely? Or how it is finding its slave servers differently?