public inbox for [email protected]
help / color / mirror / Atom feedFrom: Laurenz Albe <[email protected]>
To: Dirk Krautschick <[email protected]>
To: [email protected]
Subject: Re: REFRESH MATERIALIZED VIEW CONCURRENTLY is blocking autovacuum on table
Date: Mon, 09 Feb 2026 12:11:37 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
On Mon, 2026-02-09 at 02:17 +0100, Dirk Krautschick wrote:
> I have a situation here where a frequent
>
> REFRESH MATERIALIZED VIEW CONCURRENTLY
>
> is preventing autovacuum on some tables kind of running into a circle of growing.
I'm not sure I understand you correctly.
REFRESH MATERIALIZED VIEW CONCURRENTLY will block VACUUM on the materialized
view, because the statements take conflicting locks.
But the statement won't block VACUUM on the underlying tables.
However, if REFRESH MATERIALIZED VIEW CONCURRENTLY is running for a long time,
you will have a long-running transaction, and VACUUM won't be able to clean
up tuples that became dead later.
> Why is this acutally blocking autovacuum and what is the best practice to prevent
> this excelt just not refreshing the materialized view frequently? :-)
I also have trouble understanding that sentence.
Yours,
Laurenz Albe
view thread (3+ messages)
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: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: REFRESH MATERIALIZED VIEW CONCURRENTLY is blocking autovacuum on table
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox