Re: Writing WAL files

From: Robert Inder <robert(at)interactive(dot)co(dot)uk>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Writing WAL files
Date: 2020-10-04 20:11:15
Message-ID: CAKqjJm9A1sJXzFYfp6HFYYHX9tnF56qck=wTxv_i0Rd+96ewKg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, 4 Oct 2020 at 20:52, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:

>
> This is on purpose; archiving WAL files that contain nothing is pure
> wastage of good electrons.

Seriously? Oh, holy ****

> 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.

And are those things updated when there are no changes to the master
database?
If so, can anyone make the case that continually checking and updating them
(how often?) wastes fewer electrons than shipping an empty file every few
minutes?

Or are they only measured when something is updated?

If I upgrade/install/reconfigure/restart something, I want to know that I
haven't broken the sync.

Will looking at the replay_lag (where? master? standby?) tell me that the
sync is still good?
Or will they capture the last sync. operation, and so only tell me what I
need to know if I do some kind of database operation?

And if I have to do some kind of database operation, I may as well stick
wiht the current arrangement,
since that operation would force a WAL file transfer anyway...

(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.)
>

Maybe, but it's forcing me to spend time understanding stuff that I really
don't want to know about.

Robert.

--
Robert Inder, 0131 229 1052 / 07808 492
213
Interactive Information Ltd, 3, Lauriston Gardens, Edinburgh EH3 9HH
Registered in Scotland, Company no. SC 150689
Interactions speak louder than
words

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Igor Korot 2020-10-04 20:14:29 Can't query system tables during transaction
Previous Message Alvaro Herrera 2020-10-04 19:52:24 Re: Writing WAL files