On Wed, Jun 24, 2020 at 2:37 PM Fujii Masao <masao.fu...@oss.nttdata.com> wrote: > > On 2020/06/23 15:27, Amit Kapila wrote: > > > > Having a separate function for this seems like a good idea but can we > > consider displaying it in a view like pg_stat_replication_slots as we > > are discussing a nearby thread to have such a view for other things. > > I think ultimately this information is required to check whether some > > slot can be invalidated or not, so having it displayed along with > > other slot information might not be a bad idea. > > "the current WAL LSN - max(wal_keep_segments * 16MB, max_slot_wal_keep_size)" > is the same value between all the replication slots. But you think it's better > to display that same value for every slots in the view? > > Or you're thinking to display the difference of that LSN value and > restart_lsn as Horiguchi-san suggested? >
I see value in Horiguchi-San's proposal. IIUC, it will tell help DBAs/Users to know if any particular slot will get invalidated soon. > That diff varies each replication slot, > so it seems ok to display it for every rows. > Yes. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com