pgsql: Persist slot invalidation correctly

2020-06-26 Thread Alvaro Herrera
Persist slot invalidation correctly We failed to save slot to disk after invalidating it, so the state was lost in case of server restart or crash. Fix by marking it dirty and flushing. Also, if the slot is known invalidated we don't need to reason about the LSN at all -- it's known invalidated.

pgsql: Persist slot invalidation correctly

2020-06-26 Thread Alvaro Herrera
Persist slot invalidation correctly We failed to save slot to disk after invalidating it, so the state was lost in case of server restart or crash. Fix by marking it dirty and flushing. Also, if the slot is known invalidated we don't need to reason about the LSN at all -- it's known invalidated.