Yes, I have an extension/UDF that needs to know if the server is currently running as hot standby. For example, a UDF foo() wants to run on both the primary and secondary and runs different behaviors for different roles. Promoted secondary looks the same as the primary since it's no longer real hot standby. Does it make sense?
Regards, Hao Wu