On Tue, 2026-09-08 at 09:50 +0800, 李明 wrote:
> We are using materialized view to speed up complex query,and found that every time
> we execute the command:refresh materialized view mv_name,it generated lots of WAL
> (the size is almost the same as the base table).
>
> I checked the manual but did not find a “unlog” for materialized view.
>
> So, Is there a way to avoid “refresh materialized view” generating WAL?or suppress it?
Currently, that is not possible.
There *were* unlogged materialized views originally, but the sign was flawed (it was
not possible to distinguish between a valid empty materialized view and one that was
empty because of crash recovery), so the feature was deactivated.
There is currently a patch in development to get them back:
https://commitfest.postgresql.org/patch/7167/
The best you can do is to test and review the patch to promote its acceptance.
Yours,
Laurenz Albe