pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: postgresql.org@stelb.de
Subject: refresh concurrently: limitation of diff refreshing
Date: Mon, 23 Aug 2021 15:46:17 +0000
Message-ID: <162973357793.28128.505258270982042855@wrigleys.postgresql.org> (raw)

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/13/sql-refreshmaterializedview.html
Description:

Hi,

it may seem obvious, but it took us TB of WALs and some time to identify the
problem, why a bigger materialized view created much more WALs than a normal
refresh.

A concurrent refresh needs at least one unique index 
and no column of these indexes should be null: unique columns with null
cannot identified as unchanged and will be replaced.

I am not sure about the wording, but there should be a hint that this can be
a problem.
This might be ok for only a few rows but we had >14.000.000 rows and only a
few thousand had all values set for the unique index. Hourly refresh, TB of
WAL/day for just 4GB of database :-(

This is at least valid for 11 - 13

Thanks :)

Stefan


Message-ID: <162973357793.28128.505258270982042855@wrigleys.postgresql.org>
Permalink:  ../162973357793.28128.505258270982042855@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/162973357793.28128.505258270982042855@wrigleys.postgresql.org

 · 

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-docs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, postgresql.org@stelb.de
  Subject: Re: refresh concurrently: limitation of diff refreshing
  In-Reply-To: <162973357793.28128.505258270982042855@wrigleys.postgresql.org>

* 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