From 1d6c72a55b23554cfb946527dc77f9d80044ae2c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 6 May 2013 13:26:51 -0400 Subject: Move materialized views' is-populated status into their pg_class entries. Previously this state was represented by whether the view's disk file had zero or nonzero size, which is problematic for numerous reasons, since it's breaking a fundamental assumption about heap storage. This was done to allow unlogged matviews to revert to unpopulated status after a crash despite our lack of any ability to update catalog entries post-crash. However, this poses enough risk of future problems that it seems better to not support unlogged matviews until we can find another way. Accordingly, revert that choice as well as a number of existing kluges forced by it in favor of creating a pg_class.relispopulated flag column. --- doc/src/sgml/catalogs.sgml | 14 +++++++++++--- doc/src/sgml/func.sgml | 9 --------- 2 files changed, 11 insertions(+), 12 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index 6c0ef5bd195..ec5232c91a0 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -1863,6 +1863,14 @@ True if table has (or once had) any inheritance children + + relispopulated + bool + + True if relation is populated (this is true for all + relations other than some materialized views) + + relfrozenxid xid @@ -7776,14 +7784,14 @@ hasindexes boolean - pg_class.relhasindex + True if materialized view has (or recently had) any indexes - isscannable + ispopulated boolean - True if materialized view can currently be scanned + True if materialized view is currently populated definition diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 3ae2f23390f..af00527fde3 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -14238,10 +14238,6 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); pg_tablespace_location - - pg_relation_is_scannable - - pg_typeof @@ -14410,11 +14406,6 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); text get the path in the file system that this tablespace is located in - - pg_relation_is_scannable(relation_oid) - boolean - is the relation scannable; a materialized view which has not been loaded will not be scannable - pg_typeof(any) regtype -- cgit v1.2.3