Re: Avoid calling SetMatViewPopulatedState if possible

From: cca5507 <cca5507(at)qq(dot)com>
To: 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-05-05 11:58:34
Message-ID: tencent_740AA48C1EDECD01AF5D7C285821756D5A06@qq.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Thanks for your reply!

> While being a simple patch, it would be good to know what actual use
> cases this change improves on and by how much. Can you share a test case
> and/or performance data?

The improvement of performance is small, so it's hard to observe it. But I think
the patch is still useful because we can avoid generating dead pg_class tuple:

create table t(a int);
create materialized view m as select a from t;
create unique index on m(a);
select ctid from pg_class where relname = 'm';
refresh materialized view concurrently m;
select ctid from pg_class where relname = 'm';

Before the patch, the ctid will change every time we refresh the matview.

--
Regards,
ChangAo Chen

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message John Naylor 2026-05-05 11:56:37 Re: vectorized CRC on ARM64