Re: REFRESH MATERIALIZED VIEW CONCURRENTLY is blocking autovacuum on table

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Dirk Krautschick <dee-kay(at)gmx(dot)de>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: REFRESH MATERIALIZED VIEW CONCURRENTLY is blocking autovacuum on table
Date: 2026-02-09 01:41:47
Message-ID: 5e7e85fc-f462-41aa-a239-0866a6f72f9b@aklaver.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2/8/26 17:17, Dirk Krautschick wrote:
> Hi,
>
> 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.

You will need to:

1) Show the original CREATE MATERIALIZED VIEW command.

2) Indicate if the blocked autovacuum is on the tables the view is
pulling from or other tables.

3) Tell us the Postgres version and whether it is community version or a
fork.

>
> Why is this acutally blocking autovacuum and what is the best practice
> to prevent
> this excelt just not refreshing the materialized view frequently? :-)
>
> Cheers
>
> Dirk

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message jian he 2026-02-09 03:48:09 Re: Emitting JSON to file using COPY TO
Previous Message Dirk Krautschick 2026-02-09 01:17:59 REFRESH MATERIALIZED VIEW CONCURRENTLY is blocking autovacuum on table