Re: Unlogged materialized views

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Adam Brusselback <adambrusselback(at)gmail(dot)com>
Subject: Re: Unlogged materialized views
Date: 2026-10-14 15:29:13
Message-ID: CAN4CZFO7NREnzNPkAmyeWRtMtAp6WPR1PqSp7wQUCb7yB--8Fg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> == no relispopulated in pg_matviews ==
>
> Client tools like pgAdmin rely on this column to display matview info:

There is (or rather: there wasn't even before), the column is called
pg_matview.ispopulated and it is still there

> column c.relispopulated does not exist
> LINE 6: c.relispopulated AS with_data,
> ^
> HINT: Perhaps you meant to reference the column "c.relpopulated".

What is missing is the relispopulated boolean from pg_class, and I
don't see how that could stay with this approach.

pg_class.relispopulated could only stay if we could update it after
recovery, but before accepting connections (as otherwise it could
become stale for unlogged matviews), and I don't see an easy way to do
that, that's why I implemented this patch in a different way.
Otherwise, it could become stale, that's why the patch removes it.

But looking at pgadmin, it would be easy to patch it in a way that
works with both all earlier versions and this patch.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2026-10-14 15:36:18 Re: [PATCH] pg_upgrade: handle failed nonblocking connects on Windows
Previous Message Tom Lane 2026-10-14 15:14:50 Re: [PG19] jsonb_object_agg as a window function returns stale values