On 2020-Jun-25, Kyotaro Horiguchi wrote:
> It is error-prone restriction, as discussed before.
>
> Without changing updator-side, invalid restart_lsn AND valid
> invalidated_at can be regarded as the lost state. With the following
> change suggested by Fujii-san we can avoid the confusing status.
>
> With attached first patch on top of the slot-dirtify fix below, we get
> "lost" for invalidated slots after restart.
Makes sense. I pushed this change, thanks.
> The confusing status can be avoided without fixing it, but I prefer to
> fix it. As Fujii-san suggested upthread, couldn't we remember
> lastRemovedSegNo in the contorl file? (Yeah, it cuases a bump of
> PG_CONTROL_VERSION and CATALOG_VERSION_NO?).
I think that's a pg14 change. Feel free to submit a patch to the
commitfest.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services