improve-partition-links.patch
application/octet-stream
Filename: improve-partition-links.patch
Type: application/octet-stream
Part: 0
Message:
DOCS: add helpful partitioning links
Patch
Format: unified
| File | + | − |
|---|---|---|
| doc/src/sgml/ddl.sgml | 15 | 10 |
diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index 9d7e2c756b..3bc4fed85e 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -4266,8 +4266,8 @@ CREATE TABLE measurement_y2008m02 PARTITION OF measurement
TABLESPACE fasttablespace;
</programlisting>
- As an alternative, it is sometimes more convenient to create the
- new table outside the partition structure, and attach it as a
+ As an alternative, it is sometimes more convenient to create a
+ new table outside of the partition structure, and attach it as a
partition later. This allows new data to be loaded, checked, and
transformed prior to it appearing in the partitioned table.
Moreover, the <literal>ATTACH PARTITION</literal> operation requires
@@ -4275,9 +4275,14 @@ CREATE TABLE measurement_y2008m02 PARTITION OF measurement
partitioned table, as opposed to the <literal>ACCESS
EXCLUSIVE</literal> lock that is required by <command>CREATE TABLE
... PARTITION OF</command>, so it is more friendly to concurrent
- operations on the partitioned table.
- The <literal>CREATE TABLE ... LIKE</literal> option is helpful
- to avoid tediously repeating the parent table's definition:
+ operations on the partitioned table; see
+ <link linkend="sql-altertable-attach-partition"><literal>ALTER TABLE ... ATTACH PARTITION</literal></link>
+ for additional details.
+
+ The
+ <link linked="sql-createtable-parms-like"><literal>CREATE TABLE ... LIKE</literal></link>
+ command can be helpful to avoid tediously repeating the parent table's
+ definition, for example:
<programlisting>
CREATE TABLE measurement_y2008m02
@@ -4330,14 +4335,14 @@ ALTER TABLE measurement ATTACH PARTITION measurement_y2008m02
As explained above, it is possible to create indexes on partitioned tables
so that they are applied automatically to the entire hierarchy.
This is very
- convenient, as not only will the existing partitions become indexed, but
- also any partitions that are created in the future will. One limitation is
+ convenient as not only will the existing partitions become indexed, but
+ any partitions created in the future will as well. One limitation is
that it's not possible to use the <literal>CONCURRENTLY</literal>
qualifier when creating such a partitioned index. To avoid long lock
times, it is possible to use <command>CREATE INDEX ON ONLY</command>
- the partitioned table; such an index is marked invalid, and the partitions
- do not get the index applied automatically. The indexes on partitions can
- be created individually using <literal>CONCURRENTLY</literal>, and then
+ the partitioned table; such an index is marked invalid and the partitions
+ do not get the index applied automatically. The partition indexes can
+ then be created individually using <literal>CONCURRENTLY</literal> and
<firstterm>attached</firstterm> to the index on the parent using
<command>ALTER INDEX .. ATTACH PARTITION</command>. Once indexes for all
partitions are attached to the parent index, the parent index is marked