mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-07 19:47:50 +08:00
table: docs: fix typos and grammar.
Author: Justin Pryzby Discussion: https://postgr.es/m/20190404055138.GA24864@telsasoft.com
This commit is contained in:
parent
3e6b0c4729
commit
86cc06d1cf
@ -587,7 +587,7 @@
|
|||||||
The catalog <structname>pg_am</structname> stores information about
|
The catalog <structname>pg_am</structname> stores information about
|
||||||
relation access methods. There is one row for each access method supported
|
relation access methods. There is one row for each access method supported
|
||||||
by the system.
|
by the system.
|
||||||
Currently, only table and indexes have access methods. The requirements for table
|
Currently, only tables and indexes have access methods. The requirements for table
|
||||||
and index access methods are discussed in detail in <xref linkend="tableam"/> and
|
and index access methods are discussed in detail in <xref linkend="tableam"/> and
|
||||||
<xref linkend="indexam"/> respectively.
|
<xref linkend="indexam"/> respectively.
|
||||||
</para>
|
</para>
|
||||||
|
@ -106,11 +106,11 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replac
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
In contrast to <command>CREATE TABLE AS</command> <command>SELECT
|
In contrast to <command>CREATE TABLE AS</command>, <command>SELECT
|
||||||
INTO</command> does not allow to specify properties like a table's access
|
INTO</command> does not allow to specify properties like a table's access
|
||||||
method with <xref linkend="sql-createtable-method" /> or the table's
|
method with <xref linkend="sql-createtable-method" /> or the table's
|
||||||
tablespace with <xref linkend="sql-createtable-tablespace" />. Use <xref
|
tablespace with <xref linkend="sql-createtable-tablespace" />. Use <xref
|
||||||
linkend="sql-createtableas"/> if necessary. Therefore the default table
|
linkend="sql-createtableas"/> if necessary. Therefore, the default table
|
||||||
access method is chosen for the new table. See <xref
|
access method is chosen for the new table. See <xref
|
||||||
linkend="guc-default-table-access-method"/> for more information.
|
linkend="guc-default-table-access-method"/> for more information.
|
||||||
</para>
|
</para>
|
||||||
|
@ -189,11 +189,11 @@ there.
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Note that the following sections describe the way the builtin
|
Note that the following sections describe the behavior of the builtin
|
||||||
<literal>heap</literal> <link linkend="tableam">table access method</link>,
|
<literal>heap</literal> <link linkend="tableam">table access method</link>,
|
||||||
and the builtin <link linkend="indexam">index access methods</link> work. Due
|
and the builtin <link linkend="indexam">index access methods</link>. Due
|
||||||
to the extensible nature of <productname>PostgreSQL</productname> other types
|
to the extensible nature of <productname>PostgreSQL</productname>, other
|
||||||
of access method might work similar or not.
|
access methods might work differently.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -703,11 +703,11 @@ erased (they will be recreated automatically as needed).
|
|||||||
This section provides an overview of the page format used within
|
This section provides an overview of the page format used within
|
||||||
<productname>PostgreSQL</productname> tables and indexes.<footnote>
|
<productname>PostgreSQL</productname> tables and indexes.<footnote>
|
||||||
<para>
|
<para>
|
||||||
Actually, neither table nor index access methods need not use this page
|
Actually, use of this page format is not required for either table or
|
||||||
format. All the existing index methods do use this basic format, but the
|
index access methods. The <literal>heap</literal> table access method
|
||||||
data kept on index metapages usually doesn't follow the item layout
|
always uses this format. All the existing index methods also use the
|
||||||
rules. The <literal>heap</literal> table access method also always uses
|
basic format, but the data kept on index metapages usually doesn't follow
|
||||||
this format.
|
the item layout rules.
|
||||||
</para>
|
</para>
|
||||||
</footnote>
|
</footnote>
|
||||||
Sequences and <acronym>TOAST</acronym> tables are formatted just like a regular table.
|
Sequences and <acronym>TOAST</acronym> tables are formatted just like a regular table.
|
||||||
|
@ -48,33 +48,33 @@
|
|||||||
callbacks and their behavior is defined in the
|
callbacks and their behavior is defined in the
|
||||||
<structname>TableAmRoutine</structname> structure (with comments inside the
|
<structname>TableAmRoutine</structname> structure (with comments inside the
|
||||||
struct defining the requirements for callbacks). Most callbacks have
|
struct defining the requirements for callbacks). Most callbacks have
|
||||||
wrapper functions, which are documented for the point of view of a user,
|
wrapper functions, which are documented from the point of view of a user
|
||||||
rather than an implementor, of the table access method. For details,
|
(rather than an implementor) of the table access method. For details,
|
||||||
please refer to the <ulink url="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/access/tableam.h;hb=HEAD">
|
please refer to the <ulink url="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/access/tableam.h;hb=HEAD">
|
||||||
<filename>src/include/access/tableam.h</filename></ulink> file.
|
<filename>src/include/access/tableam.h</filename></ulink> file.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To implement a access method, an implementor will typically need to
|
To implement an access method, an implementor will typically need to
|
||||||
implement a AM specific type of tuple table slot (see
|
implement an AM-specific type of tuple table slot (see
|
||||||
<ulink url="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/executor/tuptable.h;hb=HEAD">
|
<ulink url="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/executor/tuptable.h;hb=HEAD">
|
||||||
<filename>src/include/executor/tuptable.h</filename></ulink>) which allows
|
<filename>src/include/executor/tuptable.h</filename></ulink>), which allows
|
||||||
code outside the access method to hold references to tuples of the AM, and
|
code outside the access method to hold references to tuples of the AM, and
|
||||||
to access the columns of the tuple.
|
to access the columns of the tuple.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Currently the the way an AM actually stores data is fairly
|
Currently, the way an AM actually stores data is fairly unconstrained. For
|
||||||
unconstrained. It is e.g. possible to use postgres' shared buffer cache,
|
example, it's possible, but not required, to use postgres' shared buffer
|
||||||
but not required. In case shared buffers are used, it likely makes to
|
cache. In case it is used, it likely makes sense to use
|
||||||
postgres' standard page layout described in <xref
|
<productname>PostgreSQL</productname>'s standard page layout as described in
|
||||||
linkend="storage-page-layout"/>.
|
<xref linkend="storage-page-layout"/>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
One fairly large constraint of the table access method API is that,
|
One fairly large constraint of the table access method API is that,
|
||||||
currently, if the AM wants to support modifications and/or indexes, it is
|
currently, if the AM wants to support modifications and/or indexes, it is
|
||||||
necessary that each tuple has a tuple identifier (<acronym>TID</acronym>)
|
necessary for each tuple to have a tuple identifier (<acronym>TID</acronym>)
|
||||||
consisting of a block number and an item number (see also <xref
|
consisting of a block number and an item number (see also <xref
|
||||||
linkend="storage-page-layout"/>). It is not strictly necessary that the
|
linkend="storage-page-layout"/>). It is not strictly necessary that the
|
||||||
sub-parts of <acronym>TIDs</acronym> have the same meaning they e.g. have
|
sub-parts of <acronym>TIDs</acronym> have the same meaning they e.g. have
|
||||||
@ -83,13 +83,14 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
For crash safety an AM can use postgres' <link
|
For crash safety, an AM can use postgres' <link
|
||||||
linkend="wal"><acronym>WAL</acronym></link>, or a custom approach can be
|
linkend="wal"><acronym>WAL</acronym></link>, or a custom implementation.
|
||||||
implemented. If <acronym>WAL</acronym> is chosen, either <link
|
If <acronym>WAL</acronym> is chosen, either <link
|
||||||
linkend="generic-wal">Generic WAL Records</link> can be used — which
|
linkend="generic-wal">Generic WAL Records</link> can be used,
|
||||||
implies higher WAL volume but is easy, or a new type of
|
or a new type of <acronym>WAL</acronym> records can be implemented.
|
||||||
<acronym>WAL</acronym> records can be implemented — but that
|
Generic WAL Records are easy, but imply higher WAL volume.
|
||||||
currently requires modifications of core code (namely modifying
|
Implementation of a new type of WAL record
|
||||||
|
currently requires modifications to core code (specifically,
|
||||||
<filename>src/include/access/rmgrlist.h</filename>).
|
<filename>src/include/access/rmgrlist.h</filename>).
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -103,8 +104,8 @@
|
|||||||
<para>
|
<para>
|
||||||
Any developer of a new <literal>table access method</literal> can refer to
|
Any developer of a new <literal>table access method</literal> can refer to
|
||||||
the existing <literal>heap</literal> implementation present in
|
the existing <literal>heap</literal> implementation present in
|
||||||
<filename>src/backend/heap/heapam_handler.c</filename> for more details of
|
<filename>src/backend/heap/heapam_handler.c</filename> for details of
|
||||||
how it is implemented.
|
its implementation.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</chapter>
|
</chapter>
|
||||||
|
Loading…
Reference in New Issue
Block a user