pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: Postgres General <pgsql-general@postgresql.org>
Subject: Re: pg_stat_replication view
Date: Tue, 11 Dec 2018 10:57:33 +0900
Message-ID: <20181211015733.GD1473@paquier.xyz> (raw)
In-Reply-To: <CAMkU=1wVVWFy=7y+gsydrc6SW0rQMwoaopw8HGwfOHYYJG59fA@mail.gmail.com>
References: <CAMkU=1wVVWFy=7y+gsydrc6SW0rQMwoaopw8HGwfOHYYJG59fA@mail.gmail.com>

On Mon, Dec 10, 2018 at 02:24:43PM -0500, Jeff Janes wrote:
> What does this mean?  Is the standby "caught up" when it replays the LSN
> which was current on the master as-of the time that the standby initiated
> this connection?  Or is it caught up when the master receives at least one
> notification that a certain LSN was replayed on the replica, and verifies
> that no new WAL has been generated after that certain LSN was generated?
> Neither of those things?

The WAL sender would switch from catchup to streaming mode when it sees
that there is no more data to send to the standby.  Please look for the
call of WalSndSetState(WALSNDSTATE_STREAMING) in walsender.c.

> If a replica has caught up and then fallen behind again, is that different
> from a user/dba perspective than if it never caught up in the first
> place?

Not really, because it means that it has been able to catch up with the
latest LSN of the primary at least once.  Perhaps you have suggestions
to improve the documentation?
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (2+ messages)

Message-ID: <20181211015733.GD1473@paquier.xyz>
Permalink:  ../20181211015733.GD1473@paquier.xyz/
Also on:    postgresql.org/message-id/20181211015733.GD1473@paquier.xyz

 · 

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-general@postgresql.org
  Cc: michael@paquier.xyz, jeff.janes@gmail.com
  Subject: Re: pg_stat_replication view
  In-Reply-To: <20181211015733.GD1473@paquier.xyz>
  References: <CAMkU=1wVVWFy=7y+gsydrc6SW0rQMwoaopw8HGwfOHYYJG59fA@mail.gmail.com> <20181211015733.GD1473@paquier.xyz>

* 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