Re: documentation question regarding REFRESH MATERIALIZED VIEW CONCURRENTLY - Mailing list pgsql-general

From Tobias McNulty
Subject Re: documentation question regarding REFRESH MATERIALIZED VIEW CONCURRENTLY
Date
Msg-id CAMGFDKQbLxahN8mthNU47r8iRB67261SQdk+BtbiBuOqtXNrUg@mail.gmail.com
Whole thread Raw
In response to Re: documentation question regarding REFRESH MATERIALIZED VIEW CONCURRENTLY  (Greg Sabino Mullane <htamfids@gmail.com>)
List pgsql-general
On Sun, Feb 23, 2025 at 10:21 AM Greg Sabino Mullane <htamfids@gmail.com> wrote:
> This is the correct interpretation. A regular refresh simply runs the query and replaces the old view, regardless of
thenumber of rows that have changed. A concurrent refresh runs the query and updates the rows in place, so it is very
sensitiveas to how many of those rows have changed. This also means that many concurrent refreshes can lead to table
bloat.And it will generate more WAL than a regular refresh. 
>
> My takeaway: use regular refresh when you can. Switch to concurrent if the number of changes is very small, or if
constantclient access to the view is very important. 

This makes sense to me. Many thanks.

Cheers,
Tobias



pgsql-general by date:

Previous
From: Greg Sabino Mullane
Date:
Subject: Re: documentation question regarding REFRESH MATERIALIZED VIEW CONCURRENTLY
Next
From: Marcelo Fernandes
Date:
Subject: Default Value Retention After Dropping Default