pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Cc: Thomas Munro <thomas.munro@gmail.com>
Subject: Re: pg_stat_wal_receiver and flushedUpto/writtenUpto
Date: Fri, 15 May 2020 19:34:46 -0400
Message-ID: <20200515233446.GA334@alvherre.pgsql> (raw)
In-Reply-To: <20200515230539.GC212736@paquier.xyz>

On 2020-May-16, Michael Paquier wrote:

> On Fri, May 15, 2020 at 01:43:11PM -0400, Alvaro Herrera wrote:
> > Why do you put the column at the end?  I would put written_lsn before
> > flushed_lsn.
> 
> Fine by me.  I was thinking yesterday about putting the written
> position after the flushed one, and finished with something that maps
> with the structure.

IIRC the only reason to put the written LSN where it is is so that it's
below the mutex, to indicate it's not protected by it.  Conceptually,
the written LSN is "before" the flushed LSN, which is why I propose to
put it ahead of it.

> > Since this requires a catversion bump, I think it'd be best to do it
> > before beta1 next week.
> 
> Yes.  What do you think of the attached?

Yeah, that seems good (I didn't verify the boilerplate in
pg_stat_get_wal_receiver or pg_proc.dat).  I propose

+       Last write-ahead log location already received and written to
+       disk, but not flushed.  This should not be used for data
+       integrity checks.

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





view thread (9+ messages)  latest in thread

Message-ID: <20200515233446.GA334@alvherre.pgsql>
Permalink:  ../20200515233446.GA334@alvherre.pgsql/
Also on:    postgresql.org/message-id/20200515233446.GA334@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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@2ndquadrant.com, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org, thomas.munro@gmail.com
  Subject: Re: pg_stat_wal_receiver and flushedUpto/writtenUpto
  In-Reply-To: <20200515233446.GA334@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