Re: Reviving lost replication slots

2022-11-10 Thread Bharath Rupireddy
On Thu, Nov 10, 2022 at 4:12 PM sirisha chamarthi wrote: > > On Wed, Nov 9, 2022 at 12:32 AM Kyotaro Horiguchi > wrote: >> >> I don't think walsenders fetching segment from archive is totally >> stupid. With that feature, we can use fast and expensive but small >> storage for pg_wal, while

Re: Reviving lost replication slots

2022-11-10 Thread Amit Kapila
On Thu, Nov 10, 2022 at 4:07 PM sirisha chamarthi wrote: > > On Wed, Nov 9, 2022 at 2:37 AM Amit Kapila wrote: >> >> On Fri, Nov 4, 2022 at 1:40 PM sirisha chamarthi >> wrote: >> > >> Is the intent of setting restart_lsn to InvalidXLogRecPtr was to >> disallow reviving the slot? >> > >> >> I

Re: Reviving lost replication slots

2022-11-10 Thread sirisha chamarthi
On Wed, Nov 9, 2022 at 12:32 AM Kyotaro Horiguchi wrote: > I don't think walsenders fetching segment from archive is totally > stupid. With that feature, we can use fast and expensive but small > storage for pg_wal, while avoiding replciation from dying even in > emergency. > Thanks! If there

Re: Reviving lost replication slots

2022-11-10 Thread sirisha chamarthi
On Wed, Nov 9, 2022 at 2:37 AM Amit Kapila wrote: > On Fri, Nov 4, 2022 at 1:40 PM sirisha chamarthi > wrote: > > > Is the intent of setting restart_lsn to InvalidXLogRecPtr was to > disallow reviving the slot? > > > > I think the intent is to compute the correct value for >

Re: Reviving lost replication slots

2022-11-09 Thread Amit Kapila
On Fri, Nov 4, 2022 at 1:40 PM sirisha chamarthi wrote: > Is the intent of setting restart_lsn to InvalidXLogRecPtr was to disallow reviving the slot? > I think the intent is to compute the correct value for replicationSlotMinLSN as we use restart_lsn for it and using the invalidated slot's

Re: Reviving lost replication slots

2022-11-09 Thread Bharath Rupireddy
On Wed, Nov 9, 2022 at 3:53 PM Amit Kapila wrote: > > On Wed, Nov 9, 2022 at 3:00 PM Bharath Rupireddy > wrote: > > > > On Wed, Nov 9, 2022 at 2:02 PM Kyotaro Horiguchi > > wrote: > > > > > > I don't think walsenders fetching segment from archive is totally > > > stupid. With that feature, we

Re: Reviving lost replication slots

2022-11-09 Thread Amit Kapila
On Wed, Nov 9, 2022 at 3:00 PM Bharath Rupireddy wrote: > > On Wed, Nov 9, 2022 at 2:02 PM Kyotaro Horiguchi > wrote: > > > > I don't think walsenders fetching segment from archive is totally > > stupid. With that feature, we can use fast and expensive but small > > storage for pg_wal, while

Re: Reviving lost replication slots

2022-11-09 Thread Bharath Rupireddy
On Wed, Nov 9, 2022 at 2:02 PM Kyotaro Horiguchi wrote: > > I don't think walsenders fetching segment from archive is totally > stupid. With that feature, we can use fast and expensive but small > storage for pg_wal, while avoiding replciation from dying even in > emergency. It seems like a

Re: Reviving lost replication slots

2022-11-09 Thread Kyotaro Horiguchi
I don't think walsenders fetching segment from archive is totally stupid. With that feature, we can use fast and expensive but small storage for pg_wal, while avoiding replciation from dying even in emergency. At Tue, 8 Nov 2022 19:39:58 -0800, sirisha chamarthi wrote in > > If it's a

Re: Reviving lost replication slots

2022-11-08 Thread sirisha chamarthi
On Mon, Nov 7, 2022 at 11:17 PM Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > On Tue, Nov 8, 2022 at 12:08 PM sirisha chamarthi > wrote: > > > > On Fri, Nov 4, 2022 at 11:02 PM Amit Kapila > wrote: > >> > >> On Fri, Nov 4, 2022 at 1:40 PM sirisha chamarthi > >> wrote: >

Re: Reviving lost replication slots

2022-11-08 Thread sirisha chamarthi
On Tue, Nov 8, 2022 at 1:36 AM Amit Kapila wrote: > On Tue, Nov 8, 2022 at 12:08 PM sirisha chamarthi > wrote: > > > > On Fri, Nov 4, 2022 at 11:02 PM Amit Kapila > wrote: > >> > >> On Fri, Nov 4, 2022 at 1:40 PM sirisha chamarthi > >> wrote: > >> > > >> > A replication slot can be lost when

Re: Reviving lost replication slots

2022-11-08 Thread Amit Kapila
On Tue, Nov 8, 2022 at 12:08 PM sirisha chamarthi wrote: > > On Fri, Nov 4, 2022 at 11:02 PM Amit Kapila wrote: >> >> On Fri, Nov 4, 2022 at 1:40 PM sirisha chamarthi >> wrote: >> > >> > A replication slot can be lost when a subscriber is not able to catch up >> > with the load on the primary

Re: Reviving lost replication slots

2022-11-07 Thread Bharath Rupireddy
On Tue, Nov 8, 2022 at 12:08 PM sirisha chamarthi wrote: > > On Fri, Nov 4, 2022 at 11:02 PM Amit Kapila wrote: >> >> On Fri, Nov 4, 2022 at 1:40 PM sirisha chamarthi >> wrote: >> > >> > A replication slot can be lost when a subscriber is not able to catch up >> > with the load on the primary

Re: Reviving lost replication slots

2022-11-07 Thread sirisha chamarthi
Hi Amit, Thanks for your comments! On Fri, Nov 4, 2022 at 11:02 PM Amit Kapila wrote: > On Fri, Nov 4, 2022 at 1:40 PM sirisha chamarthi > wrote: > > > > A replication slot can be lost when a subscriber is not able to catch up > with the load on the primary and the WAL to catch up exceeds >

Re: Reviving lost replication slots

2022-11-05 Thread Amit Kapila
On Fri, Nov 4, 2022 at 1:40 PM sirisha chamarthi wrote: > > A replication slot can be lost when a subscriber is not able to catch up with > the load on the primary and the WAL to catch up exceeds > max_slot_wal_keep_size. When this happens, target has to be reseeded > (pg_dump) from the

Reviving lost replication slots

2022-11-04 Thread sirisha chamarthi
Hi, A replication slot can be lost when a subscriber is not able to catch up with the load on the primary and the WAL to catch up exceeds max_slot_wal_keep_size. When this happens, target has to be reseeded (pg_dump) from the scratch and this can take longer. I am investigating the options to