On Tue, Aug 11, 2026 at 6:55 AM Bharath Rupireddy <[email protected]> wrote: > > Please find the attached v13 patches. I addressed all the above review > comments. >
Checking 0001 patch, I noticed: + * 3. The slot is not being synced from the primary while the server is in + * recovery. This is because synced slots are always considered to be + * inactive because they don't perform logical decoding to produce changes. + */ +static inline bool +CanInvalidateXidAgedSlot(ReplicationSlot *s) ... This seems to mimic the comments from CanInvalidateIdleSlot() which I think is not correct. Because inactive_since for synced slots on standby has no meaning as we don't allow decoding from them so they are always inactive but I think the same is not true for their xmin values. Even if we want to follow the core logic of idle slots, the comments should reflect the actual cause. I feel in this case we want to mostly rely on corresponding primary slots such that when they get invalidated, we will sync those and invalidate synced slots. One more thing we should consider is that synced slot's xmin can lead to holding back xmin of primary due to hot_standby_feedback mechanism in some cases when the sync interval is longer whereas there is no such possibility w.r.t WAL, so is it okay to keep the same behaviour for both max_slot_xid_age and idle_replication_slot_timeout w.r.t synced slots? I am not sure if this is a real risk or just a theoretical possibility but wanted to bring it to your attention so that we can consider it. -- With Regards, Amit Kapila.
