I have the following database replication setup:
As you can see I do a master-slave replication and I use aload balancer in order to connect into read-only replicas.
So I want to test this setup, hence I connect into my database into postgresql read-only replicas via Load Labalcer via psql
command.
But how I can find out which replica I am connected into? I need that in order to perform a stress test.
select inet_server_addr();
maybe? That returns the IP address of the database host.