pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Robert Inder <robert@interactive.co.uk>
Cc: pgsql-general@postgresql.org
Subject: Re: Writing WAL files
Date: Sun, 4 Oct 2020 16:52:24 -0300
Message-ID: <20201004195224.GA14394@alvherre.pgsql> (raw)
In-Reply-To: <CAKqjJm83gnw2u0ugpkgc4bq58L=cLwbvmh69TwKKo83Y1CnANw@mail.gmail.com>

Hello Robert

On 2020-Oct-04, Robert Inder wrote:

> One of the things I like about the old PGSQL 9 setup is that it generates
> and ships a WAL file every few minutes, even if nothing has happened in the
> database.
> I find it re-assuring to be able to see WAL files arriving and being
> processed without problem even when the live system was idle.
> 
> But I cannot get PGSQL 12 to do this.  It only writes (and thus ships) WAL
> files when something happens in the database.
> If the database is idle, it simply does not write any WAL files.

This is on purpose; archiving WAL files that contain nothing is pure
wastage of good electrons.  I suggest that in PG12 you can monitor the
"lag" of a standby server more directly by looking at columns write_lag,
flush_lag, replay_lag in the pg_stat_replication view.  (You'll need to
change your configuration so that it uses streaming replication instead
of pg_standby and rsync, but that's far more convenient so it's a good
change anyway.)





view thread (13+ messages)  latest in thread

Message-ID: <20201004195224.GA14394@alvherre.pgsql>
Permalink:  ../20201004195224.GA14394@alvherre.pgsql/
Also on:    postgresql.org/message-id/20201004195224.GA14394@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-general@postgresql.org
  Cc: alvherre@alvh.no-ip.org, robert@interactive.co.uk
  Subject: Re: Writing WAL files
  In-Reply-To: <20201004195224.GA14394@alvherre.pgsql>
  References: <CAKqjJm83gnw2u0ugpkgc4bq58L=cLwbvmh69TwKKo83Y1CnANw@mail.gmail.com> <20201004195224.GA14394@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