diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/mvcc.sgml | 3 | ||||
-rw-r--r-- | doc/src/sgml/ref/refresh_materialized_view.sgml | 34 |
2 files changed, 34 insertions, 3 deletions
diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml index 316add70b70..cefd3235a6b 100644 --- a/doc/src/sgml/mvcc.sgml +++ b/doc/src/sgml/mvcc.sgml @@ -928,8 +928,7 @@ ERROR: could not serialize access due to read/write dependencies among transact </para> <para> - This lock mode is not automatically acquired on tables by any - <productname>PostgreSQL</productname> command. + Acquired by <command>REFRESH MATERIALIZED VIEW CONCURRENTLY</command>. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/refresh_materialized_view.sgml b/doc/src/sgml/ref/refresh_materialized_view.sgml index 8f59bbf1231..d2f8104aa7d 100644 --- a/doc/src/sgml/ref/refresh_materialized_view.sgml +++ b/doc/src/sgml/ref/refresh_materialized_view.sgml @@ -21,7 +21,7 @@ PostgreSQL documentation <refsynopsisdiv> <synopsis> -REFRESH MATERIALIZED VIEW <replaceable class="PARAMETER">name</replaceable> +REFRESH MATERIALIZED VIEW [ CONCURRENTLY ] <replaceable class="PARAMETER">name</replaceable> [ WITH [ NO ] DATA ] </synopsis> </refsynopsisdiv> @@ -38,6 +38,10 @@ REFRESH MATERIALIZED VIEW <replaceable class="PARAMETER">name</replaceable> data is generated and the materialized view is left in an unscannable state. </para> + <para> + <literal>CONCURRENTLY</literal> and <literal>WITH NO DATA</literal> may not + be specified together. + </para> </refsect1> <refsect1> @@ -45,6 +49,34 @@ REFRESH MATERIALIZED VIEW <replaceable class="PARAMETER">name</replaceable> <variablelist> <varlistentry> + <term><literal>CONCURRENTLY</literal></term> + <listitem> + <para> + Refresh the materialized view without locking out concurrent selects on + the materialized view. Without this option a refresh which affects a + lot of rows will tend to use fewer resources and complete more quickly, + but could block other connections which are trying to read from the + materialized view. This option may be faster in cases where a small + number of rows are affected. + </para> + <para> + This option is only allowed if there is at least one + <literal>UNIQUE</literal> index on the materialized view which uses only + column names and includes all rows; that is, it must not index on any + expressions nor include a <literal>WHERE</literal> clause. + </para> + <para> + This option may not be used when the materialized view is not already + populated. + </para> + <para> + Even with this option only one <literal>REFRESH</literal> at a time may + run against any one materialized view. + </para> + </listitem> + </varlistentry> + + <varlistentry> <term><replaceable class="PARAMETER">name</replaceable></term> <listitem> <para> |