| From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
|---|---|
| To: | Adam Brusselback <adambrusselback(at)gmail(dot)com> |
| Cc: | cca5507 <cca5507(at)qq(dot)com>, Zizhuan Liu <44973863(at)qq(dot)com>, David Geier <geidav(dot)pg(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Avoid calling SetMatViewPopulatedState if possible |
| Date: | 2026-08-12 05:50:58 |
| Message-ID: | CAHGQGwEFz_6-Bz7RY7NnZiQVoYc=BLJ1xOzBDsZqGf5Tcm85fA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Aug 11, 2026 at 3:29 AM Adam Brusselback
<adambrusselback(at)gmail(dot)com> wrote:
> +1 on the change. I have the same thing in the REFRESH ... WHERE patch
> [1], so I'd like to see it go in on its own.
>
> One thing worth adding to the justification: the dead tuple isn't the
> only cost. The CatalogTupleUpdate() also sends an SI message, so every
> call invalidates the relcache entry for the MV in every backend,
> including the caller's own, and that discards cached plans referencing
> it. On an MV that gets refreshed often and is already populated, the
> repeated invalidation costs more than the dead tuple does.
Thanks for the review and for sharing your analysis! I've pushed the patch.
Regards,
--
Fujii Masao
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | jian he | 2026-08-12 05:09:08 | Re: Row pattern recognition |