From: Remund Alain <alain.remund@bertschi.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: avoid WAL for refresh of materialized view
Date: Tue, 24 Mar 2020 15:59:46 +0000
Message-ID: <e6b0ccfe181f45868304015db4029746@bertschi.com> (raw)
Hi all
We have PostgreSql 9.6 running and started to work with materialized views. To refresh the materialized views, we set up a cron job that refreshes the materialized views on a fix schedule.
Since our materialized views cache quite some data, we noticed a considerable increase in WAL files. It seems, that every refresh of a materialized view is logged in the WAL.
We tried to figure out how we can alter the materialized view to set it to "UNLOGGED" but this does not seem possible.
--> "alter materialized view xyz set UNLOGGED;" leads to "ERROR: "xyz" is not a table, SQL state: 42809"
Is there another way to avoid logging a refresh of a materialized view in the WAL?
Kind regards,
Alain Remund
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: alain.remund@bertschi.com
Subject: Re: avoid WAL for refresh of materialized view
In-Reply-To: <e6b0ccfe181f45868304015db4029746@bertschi.com>
References: <e6b0ccfe181f45868304015db4029746@bertschi.com>
* 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