Re: [HACKERS] Restricting maximum keep segments by repslots

Greg Stark <stark@mit.edu>

From: Greg Stark <stark@mit.edu>
To: Sergei Kornilov <sk@zsrv.org>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>, "michael.paquier@gmail.com" <michael.paquier@gmail.com>, "andres@anarazel.de" <andres@anarazel.de>, "peter.eisentraut@2ndquadrant.com" <peter.eisentraut@2ndquadrant.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2018-01-11T13:56:14Z
Lists: pgsql-hackers
On 11 January 2018 at 09:55, Sergei Kornilov <sk@zsrv.org> wrote:
>         if (active_pid != 0)
>                 status = "streaming";
>         else
>                 status = "keeping";

Perhaps "idle" by analogy to a pg_stat_activity entry for a backend
that's connected but not doing anything.

>         status = "may_lost";

Perhaps "stale" or "expired"?

Is this patch in bike-shed territory? Are there any questions about
whether we want the basic shape to look like this?

Fwiw I think there's a real need for this feature so I would like to
get it in for Postgres 11.

-- 
greg


Commits

  1. Save slot's restart_lsn when invalidated due to size

  2. Fix checkpoint signalling

  3. Check slot->restart_lsn validity in a few more places

  4. Allow users to limit storage reserved by replication slots

  5. Remove header noise from test_decoding test

  6. Rework WAL-reading supporting structs

  7. Flip argument order in XLogSegNoOffsetToRecPtr