Re: [HACKERS] Restricting maximum keep segments by repslots - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [HACKERS] Restricting maximum keep segments by repslots
Date
Msg-id 20200406165456.GA4951@alvherre.pgsql
Whole thread Raw
In response to Re: [HACKERS] Restricting maximum keep segments by repslots  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: [HACKERS] Restricting maximum keep segments by repslots  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-hackers
On 2020-Apr-06, Kyotaro Horiguchi wrote:

> > * Andres complained that the "distance" column was not a great value to
> >   expose (20171106132050.6apzynxrqrzghb4r@alap3.anarazel.de).  That's
> >   right: it changes both by the insertion LSN as well as the slot's
> >   consumption.  Maybe we can expose the earliest live LSN (start of the
> >   earliest segment?) as a new column.  It'll be the same for all slots,
> >   I suppose, but we don't care, do we?
> 
> I don't care as far as users can calculate the "remain" of individual
> slots (that is, how far the current LSN can advance before the slot
> loses data). But the "earliest live LSN (EL-LSN) is really not
> relevant to the safeness of each slot. The distance from EL-LSN to
> restart_lsn or the current LSN doesn't generally suggest the safeness
> of individual slots.  The only relevance would be if the distance from
> EL-LSN to the current LSN is close to max_slot_wal_keep_size, the most
> lagged slot could die in a short term.

Thanks for the revised version.  Please note that you forgot to "git
add" the test file, to it's not in the patch.

I'm reviewing the patch now.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Anastasia Lubennikova
Date:
Subject: Re: pg_upgrade fails with non-standard ACL
Next
From: Magnus Hagander
Date:
Subject: Re: where should I stick that backup?