Correctly configure the postgresql replication
The primary_slot_name
property is not defined so the replication is not sticky across standby restarts.
It should be defined to a unique value like the hostname.
It should make the primary keep the wals until they are applied by the secondary