> We tend to use the term "primary" instead of "master".
Thanks, I will use primary instead of master in my next patch.
>Will this work with logical replication?
I have not tested with logical replication. Currently we identify the primary to connect based on result of "SELECT pg_is_in_recovery()". So I think it works. Do you want me test a particular setup?