aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2013-05-06 13:26:51 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2013-05-06 13:27:22 -0400
commit1d6c72a55b23554cfb946527dc77f9d80044ae2c (patch)
tree8f7964a0114022585c1a0d90f37d2fd466bb6154 /doc/src
parent5da5798004e90b14332918e7db702271442d465d (diff)
downloadpostgresql-1d6c72a55b23554cfb946527dc77f9d80044ae2c.tar.gz
postgresql-1d6c72a55b23554cfb946527dc77f9d80044ae2c.zip
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.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/catalogs.sgml14
-rw-r--r--doc/src/sgml/func.sgml9
2 files changed, 11 insertions, 12 deletions
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
@@ -1864,6 +1864,14 @@
</row>
<row>
+ <entry><structfield>relispopulated</structfield></entry>
+ <entry><type>bool</type></entry>
+ <entry></entry>
+ <entry>True if relation is populated (this is true for all
+ relations other than some materialized views)</entry>
+ </row>
+
+ <row>
<entry><structfield>relfrozenxid</structfield></entry>
<entry><type>xid</type></entry>
<entry></entry>
@@ -7776,14 +7784,14 @@
<row>
<entry><structfield>hasindexes</structfield></entry>
<entry><type>boolean</type></entry>
- <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.relhasindex</literal></entry>
+ <entry></entry>
<entry>True if materialized view has (or recently had) any indexes</entry>
</row>
<row>
- <entry><structfield>isscannable</structfield></entry>
+ <entry><structfield>ispopulated</structfield></entry>
<entry><type>boolean</type></entry>
<entry></entry>
- <entry>True if materialized view can currently be scanned</entry>
+ <entry>True if materialized view is currently populated</entry>
</row>
<row>
<entry><structfield>definition</structfield></entry>
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
@@ -14239,10 +14239,6 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
</indexterm>
<indexterm>
- <primary>pg_relation_is_scannable</primary>
- </indexterm>
-
- <indexterm>
<primary>pg_typeof</primary>
</indexterm>
@@ -14411,11 +14407,6 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
<entry>get the path in the file system that this tablespace is located in</entry>
</row>
<row>
- <entry><literal><function>pg_relation_is_scannable(<parameter>relation_oid</parameter>)</function></literal></entry>
- <entry><type>boolean</type></entry>
- <entry>is the relation scannable; a materialized view which has not been loaded will not be scannable</entry>
- </row>
- <row>
<entry><literal><function>pg_typeof(<parameter>any</parameter>)</function></literal></entry>
<entry><type>regtype</type></entry>
<entry>get the data type of any value</entry>