From: "Rajeev rastogi" <rajeev(dot)rastogi(at)huawei(dot)com>
If you changed max_connection to 4 only in primary, then I am not able to
understand, how it got changed in standby also (if you have not taken back
again)?
Let me know If I have missed something.
The primary log the new value as an XLOG_PARAMETER_CHANGE WAL record at
startup when the parameter value in postgresql.conf does not match the one
in pg_control. Then, the WAL record is sent to the standby and applied,
which changes the value in pg_control on the standby.
Regards
MauMau