On Mon, 2021-03-15 at 10:00 +0000, Swati yadav wrote: > We are using streaming replication without feature archiving and replication slots. > > Could you please help us in understanding how replication will works > when I set max_wal_size to 1GB, wal_keep_segments set to 300. > > In this scenario, replication is getting failed. Could you please brief > us the causes of failure and how can we fix this issue, apart from using > the feature archiving and replication slots. "wal_keep_size" is irrelevant to the question. "wal_keep_segments = 300" makes PostgreSQL keep 300 old WAL segments around so that standby servers can catch up after a bit of downtime. If, however, the downtime is long enough that the standby needs WAL that is in an even earlier WAL segment that has already been archived and deleted, the standby won't be able to catch up any more. If you don't want to use "restore_command" or replication slots, your only option is to increase "wal_keep_segments". Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com