| From: | Jim Jones <jim(dot)jones(at)uni-muenster(dot)de> |
|---|---|
| To: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
| Cc: | Adam Brusselback <adambrusselback(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Unlogged materialized views |
| Date: | 2026-10-13 12:56:11 |
| Message-ID: | bd706289-ce95-41bf-b417-595ec80168f8@uni-muenster.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 09/10/2026 13:40, Zsolt Parragi wrote:
> v5 is a trivial rebase changing tap test numbers.
Today I finally found some time revisit this patch.
== no relispopulated in pg_matviews ==
Client tools like pgAdmin rely on this column to display matview info:
diff --git a/src/backend/catalog/system_views.sql
b/src/backend/catalog/system_views.sql
index ddf801307eb..724a23d559f 100644
--- a/src/backend/catalog/system_views.sql
+++ b/src/backend/catalog/system_views.sql
@@ -150,7 +150,7 @@ CREATE VIEW pg_matviews AS
pg_get_userbyid(C.relowner) AS matviewowner,
T.spcname AS tablespace,
C.relhasindex AS hasindexes,
- C.relispopulated AS ispopulated,
+ pg_matview_is_populated(C.oid) AS ispopulated,
pg_get_viewdef(C.oid) AS definition
FROM pg_class C LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
LEFT JOIN pg_tablespace T ON (T.oid = C.reltablespace)
With the patch applied, pgAdmin can no longer display the properties of
a matview:
column c.relispopulated does not exist
LINE 6: c.relispopulated AS with_data,
^
HINT: Perhaps you meant to reference the column "c.relpopulated".
I will take a closer look at the code in the next few days.
Best, Jim
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alena Rybakina | 2026-10-13 13:02:46 | Re: Vacuum statistics |
| Previous Message | Álvaro Herrera | 2026-10-13 12:42:51 | Re: pgsql: Don't trust NOT NULL on virtual generated columns of partitioned |