Re: Avoid calling SetMatViewPopulatedState if possible

From: cca5507 <cca5507(at)qq(dot)com>
To: 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-06-18 09:28:17
Message-ID: tencent_EE25D4AD90B6562B054FC6010FF360DD0E05@qq.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Zizhuan,

Thanks for your careful review!

> 5. A small suggestion
> After further consideration, I suggest using the condition:
>     if (RelationIsPopulated(matviewRel) != !skipData)
> This is much more readable and intuitive compared to the original:
>     if (RelationIsPopulated(matviewRel) == skipData)
> Especially when paired with the original call:
>     SetMatViewPopulatedState(matviewRel, !skipData);

Both are ok for me.

--
Regards,
ChangAo Chen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2026-06-18 09:40:13 Re: pgbench --continue-on-error: clarify TPS and failure reporting
Previous Message Matthias van de Meent 2026-06-18 09:27:28 Re: Unexpected behavior after OOM errors