Re: min_safe_lsn column in pg_replication_slots view

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, masao(dot)fujii(at)oss(dot)nttdata(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: min_safe_lsn column in pg_replication_slots view
Date: 2020-07-08 23:07:57
Message-ID: 20200708230757.GA28114@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-Jul-08, Tom Lane wrote:

> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> > In absence of other suggestions I gave this the name XLogMBVarToSegs,
> > and redefined ConvertToXSegs to use that. Didn't touch callers in
> > xlog.c to avoid pointless churn. Pushed to both master and 13.
>
> The buildfarm's sparc64 members seem unhappy with this.

Hmm. Some of them are, yeah, but it's not universal. For example
mussurana and ibisbill are not showing failures.

Anyway the error is pretty strange: only GetWALAvailability is showing a
problem, but the size calculation in the view function def is returning
a negative number, as expected.

So looking at the code in GetWALAvailability, what happens is that
targetSeg >= oldestSlotSeg, but we expect the opposite. I'd bet for
targetSeg to be correct, since its input is just the slot LSN -- pretty
easy. But for oldestSlotSeg, we have KeepLogSeg involved.

No immediate ideas ...

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2020-07-08 23:12:40 Re: Is this a bug in pg_current_logfile() on Windows?
Previous Message Peter Geoghegan 2020-07-08 22:44:26 Re: Index Skip Scan (new UniqueKeys)