Re: min_safe_lsn column in pg_replication_slots view

Kyotaro Horiguchi <horikyota.ntt@gmail.com>

From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: alvherre@2ndquadrant.com
Cc: tgl@sss.pgh.pa.us, pgbf@twiska.com, masao.fujii@oss.nttdata.com, pgsql-hackers@lists.postgresql.org
Date: 2020-07-14T04:38:09Z
Lists: pgsql-hackers
At Mon, 13 Jul 2020 13:52:12 -0400, Alvaro Herrera <alvherre@2ndquadrant.com> wrote in 
> On 2020-Jul-13, Alvaro Herrera wrote:
> 
> > A much more sensible answer is to initialize the segno to the segment
> > currently being written, as in the attached.
> 
> Ran the valgrind test locally and it passes.  Pushed it now.

-	if (XLogRecPtrIsInvalid(*logSegNo) || segno < *logSegNo)
+	if (segno < *logSegNo)

Oops! Thank you for fixing it!

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



Commits

  1. Fix uninitialized value in segno calculation

  2. Morph pg_replication_slots.min_safe_lsn to safe_wal_size