提交 111f0e68 编写于 作者: M Mel Kiyama 提交者: David Yozie

docs - clarified system columns not available for queries on replicated tables. (#8259)

上级 49de4c60
......@@ -199,6 +199,11 @@
<li>improve query performance by making it unnecessary to broadcast frequently used tables
to all segments.</li>
</ul>
<note>The hidden system columns (<codeph>ctid</codeph>, <codeph>cmin</codeph>,
<codeph>cmax</codeph>, <codeph>xmin</codeph>, <codeph>xmax</codeph>, and
<codeph>gp_segment_id</codeph>) cannot be referenced in user queries on replicated
tables because they have no single, unambiguous value. Greenplum Database returns a
<codeph>column does not exist</codeph> error for the query.</note>
</body>
<topic id="topic35" xml:lang="en">
<title>Declaring Distribution Keys</title>
......
......@@ -248,12 +248,12 @@ Distributed by: (sale_id)
</p>
<p>A table is considered to have a balanced distribution if all segments have roughly the
same number of rows.</p>
<note>
<p>If you run this query on a replicated table it fails because Greenplum Database does
not permit user queries to reference the <codeph>gp_segment_id</codeph> system column in
replicated tables. Because every segment has all of the tables' rows, replicated tables
are evenly distributed by definition.</p>
</note>
<note>If you run this query on a replicated table, it fails because Greenplum Database does
not permit user queries to reference the system column <codeph>gp_segment_id</codeph> (or
the system columns <codeph>ctid</codeph>, <codeph>cmin</codeph>, <codeph>cmax</codeph>,
<codeph>xmin</codeph>, and <codeph>xmax</codeph>) in replicated tables. Because every
segment has all of the tables' rows, replicated tables are evenly distributed by
definition.</note>
</body>
</topic>
<topic id="topic23" xml:lang="en">
......
......@@ -147,8 +147,15 @@
such as <codeph>setval()</codeph> are not allowed to execute on distributed data in
Greenplum Database because they can cause inconsistent data between segment
instances.</p>
<p>A function can execute read-only queries on replicated tables (<codeph>DISTRIBUTED REPLICATED</codeph>)
on the segments, but any SQL command that modifies data must execute on the master instance. </p>
<p>A function can execute read-only queries on replicated tables (<codeph>DISTRIBUTED
REPLICATED</codeph>) on the segments, but any SQL command that modifies data
must execute on the master instance.
<note>The hidden system columns (<codeph>ctid</codeph>, <codeph>cmin</codeph>,
<codeph>cmax</codeph>, <codeph>xmin</codeph>, <codeph>xmax</codeph>, and
<codeph>gp_segment_id</codeph>) cannot be referenced in user queries on
replicated tables because they have no single, unambiguous value. Greenplum
Database returns a <codeph>column does not exist</codeph> error for the
query.</note></p>
<p>To ensure data consistency, you can safely use <codeph>VOLATILE</codeph> and
<codeph>STABLE</codeph> functions in statements that are evaluated on and run
from the master. For example, the following statements run on the master (statements
......
......@@ -186,7 +186,8 @@ CREATE [ [GLOBAL | LOCAL] {TEMPORARY | TEMP} | UNLOGGED ] TABLE [IF NOT EXISTS]
be inherited by another table. The hidden system columns (<codeph>ctid</codeph>,
<codeph>cmin</codeph>, <codeph>cmax</codeph>, <codeph>xmin</codeph>,
<codeph>xmax</codeph>, and <codeph>gp_segment_id</codeph>) cannot be referenced in user
queries on replicated tables because they have no single, unambiguous value.</p>
queries on replicated tables because they have no single, unambiguous value. Greenplum
Database returns a <codeph>column does not exist</codeph> error for the query.</p>
<p>The <codeph>PARTITION BY</codeph> clause allows you to divide the table into multiple
sub-tables (or parts) that, taken together, make up the parent table and share its schema.
Though the sub-tables exist as independent tables, the Greenplum Database restricts their
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册