pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: masao.fujii@oss.nttdata.com
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Review for GetWALAvailability()
Date: Tue, 16 Jun 2020 14:31:43 -0400
Message-ID: <20200616183143.GA18116@alvherre.pgsql> (raw)
In-Reply-To: <20200616.120236.1809496990963386593.horikyota.ntt@gmail.com>

On 2020-Jun-16, Kyotaro Horiguchi wrote:

> I noticed the another issue. If some required WALs are removed, the
> slot will be "invalidated", that is, restart_lsn is set to invalid
> value. As the result we hardly see the "lost" state.
> 
> It can be "fixed" by remembering the validity of a slot separately
> from restart_lsn. Is that worth doing?

We discussed this before.  I agree it would be better to do this
in some way, but I fear that if we do it naively, some code might exist
that reads the LSN without realizing that it needs to check the validity
flag first.

On the other hand, maybe this is not a problem in practice, because if
such a bug occurs, what will happen is that trying to read WAL from such
a slot will return the error message that the WAL file cannot be found.
Maybe this is acceptable?

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





view thread (38+ messages)  latest in thread

Message-ID: <20200616183143.GA18116@alvherre.pgsql>
Permalink:  ../20200616183143.GA18116@alvherre.pgsql/
Also on:    postgresql.org/message-id/20200616183143.GA18116@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@2ndquadrant.com, horikyota.ntt@gmail.com, masao.fujii@oss.nttdata.com
  Subject: Re: Review for GetWALAvailability()
  In-Reply-To: <20200616183143.GA18116@alvherre.pgsql>
  References: <20200616.120236.1809496990963386593.horikyota.ntt@gmail.com> <20200616183143.GA18116@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox