Hi Amit! Unless we have hot_standby_feedback = on, xmin would be null on the physical replication slot.
But, even if using that parameter, as long as we know that the standby already has caught up by using the archived wals then the xmin wouldn't matter, since we don't need those rows to be visible anymore. I've attached a simple patch and test here that revalidates the slot after it is lost. It is still missing any filtering besides checking if the slot is physical or logical, but we can add filters for specific invalidations. Let me know what you think. Regards, João Foltran On Wed, Jan 14, 2026 at 8:21 AM Amit Kapila <[email protected]> wrote: > > On Tue, Jan 6, 2026 at 3:26 AM Joao Foltran <[email protected]> wrote: > > > > > The slots could be invalidated due to other reasons like > > > RS_INVAL_IDLE_TIMEOUT as well. > > > > We could just filter which invalidation reasons could be "revalidated" > > for only reasons that can be resolved this way. > > > > Can we make the slot valid even the required WAL is made available > afterwards? What about the removed rows due to the slot's xmin? > > -- > With Regards, > Amit Kapila.
v1-0001-Revalidate-physical-slot-after-standby-recovery-pg18.patch
Description: Binary data
