pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Need help on understanding of wal_keep-segments and max_wal_size dependency.
2+ messages / 2 participants
[nested] [flat]

* Need help on understanding of wal_keep-segments and max_wal_size dependency.
@ 2021-03-15 10:00 Swati yadav <Swati.Yadav@Xoriant.Com>
  2021-03-15 13:44 ` Re: Need help on understanding of wal_keep-segments and max_wal_size dependency. Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 1 reply; 2+ messages in thread

From: Swati yadav @ 2021-03-15 10:00 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Hello Team


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.





Thanks & Regards
Swati Yadav | Xoriant Solutions Pvt. Ltd.
5th floor, Amar Paradigm, Baner Road, Baner,
Near D'mart, Pune - 411 045
http://www.xoriant.com<http://www.xoriant.com/;

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Need help on understanding of wal_keep-segments and max_wal_size dependency.
  2021-03-15 10:00 Need help on understanding of wal_keep-segments and max_wal_size dependency. Swati yadav <Swati.Yadav@Xoriant.Com>
@ 2021-03-15 13:44 ` Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 0 replies; 2+ messages in thread

From: Laurenz Albe @ 2021-03-15 13:44 UTC (permalink / raw)
  To: Swati yadav <Swati.Yadav@Xoriant.Com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

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






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-03-15 13:44 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15 10:00 Need help on understanding of wal_keep-segments and max_wal_size dependency. Swati yadav <Swati.Yadav@Xoriant.Com>
2021-03-15 13:44 ` Laurenz Albe <laurenz.albe@cybertec.at>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox