I have reading about difference between logical replication slots and phyiscal replication slots in Postgres. I am confused about some paramters and how they are used.
For a replication slot, we have two parameters
wal_keep_segments. For first one postgres disconnects a replication slot if replication connection is idle for more than
wal_sender_timeout. Suppose, we have a logical replication slot and we have
wal_keep_segmentsset to 0, all the older wal logs will be deleted from the server, so if the replication server disconnects and try to get wal logs again, will it be able to recover/start the replication again? Will the same thing will happen in physical replication slot as well or
wal_sender_timeoutis application only for logical replication slots?
I have hosted a CloudSQL(Google Cloud managed) database instance and I have created a read-replica which uses a physical replication slot. Parameters which are set over there are
wal_sender_timeout=60000in ms and
wal_keep_segments=0. So, I expect read-replica to not able to recover if it loses connection to master server for some time. But I think I am missing something here, since, it has happened that there was network outage for some time but still replication was happening normally after the network outage.
Can some one clear it out. I am reading online resources but able to distinguish when people are talking about logical replication and when about physical replication.
I know I can use continuous archiving to handle all the above problems but I just want to understand it from these parameters perspective.