mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Fix various typos, grammar and code style in comments and docs
This fixes a set of issues that have accumulated over the past months (or years) in various code areas. Most fixes are related to some recent additions, as of the development of v15. Author: Justin Pryzby Discussion: https://postgr.es/m/20220124030001.GQ23027@telsasoft.com
This commit is contained in:
@ -8442,8 +8442,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
|
||||
This parameter specifies the default table access method to use when
|
||||
creating tables or materialized views if the <command>CREATE</command>
|
||||
command does not explicitly specify an access method, or when
|
||||
<command>SELECT ... INTO</command> is used, which does not allow to
|
||||
specify a table access method. The default is <literal>heap</literal>.
|
||||
<command>SELECT ... INTO</command> is used, which does not allow
|
||||
specifying a table access method. The default is <literal>heap</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -1071,7 +1071,7 @@ CREATE TABLE order_items (
|
||||
represent independent objects, then <literal>RESTRICT</literal> or
|
||||
<literal>NO ACTION</literal> is more appropriate; an application that
|
||||
actually wants to delete both objects would then have to be explicit about
|
||||
this and run two delete options. In the above example, order items are
|
||||
this and run two delete commands. In the above example, order items are
|
||||
part of an order, and it is convenient if they are deleted automatically
|
||||
if an order is deleted. But products and orders are different things, and
|
||||
so making a deletion of a product automatically cause the deletion of some
|
||||
@ -4044,7 +4044,7 @@ ALTER TABLE measurement ATTACH PARTITION measurement_y2008m02
|
||||
holding an <literal>ACCESS EXCLUSIVE</literal> lock on that partition.
|
||||
It is recommended to drop the now-redundant <literal>CHECK</literal>
|
||||
constraint after the <command>ATTACH PARTITION</command> is complete. If
|
||||
the table being attached is itself a partitioned table then each of its
|
||||
the table being attached is itself a partitioned table, then each of its
|
||||
sub-partitions will be recursively locked and scanned until either a
|
||||
suitable <literal>CHECK</literal> constraint is encountered or the leaf
|
||||
partitions are reached.
|
||||
@ -4059,7 +4059,7 @@ ALTER TABLE measurement ATTACH PARTITION measurement_y2008m02
|
||||
the partition being attached. This operation will be performed whilst
|
||||
holding an <literal>ACCESS EXCLUSIVE</literal> lock on the <literal>
|
||||
DEFAULT</literal> partition. If the <literal>DEFAULT</literal> partition
|
||||
is itself a partitioned table then each of its partitions will be
|
||||
is itself a partitioned table, then each of its partitions will be
|
||||
recursively checked in the same way as the table being attached, as
|
||||
mentioned above.
|
||||
</para>
|
||||
|
@ -27367,6 +27367,79 @@ SELECT pg_size_pretty(sum(pg_relation_size(relid))) AS total_size
|
||||
</para></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry role="func_table_entry"><para role="func_signature">
|
||||
<indexterm>
|
||||
<primary>pg_ls_logicalmapdir</primary>
|
||||
</indexterm>
|
||||
<function>pg_ls_logicalmapdir</function> ()
|
||||
<returnvalue>setof record</returnvalue>
|
||||
( <parameter>name</parameter> <type>text</type>,
|
||||
<parameter>size</parameter> <type>bigint</type>,
|
||||
<parameter>modification</parameter> <type>timestamp with time zone</type> )
|
||||
</para>
|
||||
<para>
|
||||
Returns the name, size, and last modification time (mtime) of each
|
||||
ordinary file in the server's <filename>pg_logical/mappings</filename>
|
||||
directory. Filenames beginning with a dot, directories, and other
|
||||
special files are excluded.
|
||||
</para>
|
||||
<para>
|
||||
This function is restricted to superusers and members of
|
||||
the <literal>pg_monitor</literal> role by default, but other users can
|
||||
be granted EXECUTE to run the function.
|
||||
</para></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry role="func_table_entry"><para role="func_signature">
|
||||
<indexterm>
|
||||
<primary>pg_ls_logicalsnapdir</primary>
|
||||
</indexterm>
|
||||
<function>pg_ls_logicalsnapdir</function> ()
|
||||
<returnvalue>setof record</returnvalue>
|
||||
( <parameter>name</parameter> <type>text</type>,
|
||||
<parameter>size</parameter> <type>bigint</type>,
|
||||
<parameter>modification</parameter> <type>timestamp with time zone</type> )
|
||||
</para>
|
||||
<para>
|
||||
Returns the name, size, and last modification time (mtime) of each
|
||||
ordinary file in the server's <filename>pg_logical/snapshots</filename>
|
||||
directory. Filenames beginning with a dot, directories, and other
|
||||
special files are excluded.
|
||||
</para>
|
||||
<para>
|
||||
This function is restricted to superusers and members of
|
||||
the <literal>pg_monitor</literal> role by default, but other users can
|
||||
be granted EXECUTE to run the function.
|
||||
</para></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry role="func_table_entry"><para role="func_signature">
|
||||
<indexterm>
|
||||
<primary>pg_ls_replslotdir</primary>
|
||||
</indexterm>
|
||||
<function>pg_ls_replslotdir</function> ( <parameter>slot_name</parameter> <type>text</type> )
|
||||
<returnvalue>setof record</returnvalue>
|
||||
( <parameter>name</parameter> <type>text</type>,
|
||||
<parameter>size</parameter> <type>bigint</type>,
|
||||
<parameter>modification</parameter> <type>timestamp with time zone</type> )
|
||||
</para>
|
||||
<para>
|
||||
Returns the name, size, and last modification time (mtime) of each
|
||||
ordinary file in the server's <filename>pg_replslot/slot_name</filename>
|
||||
directory, where <parameter>slot_name</parameter> is the name of the
|
||||
replication slot provided as input of the function. Filenames beginning
|
||||
with a dot, directories, and other special files are excluded.
|
||||
</para>
|
||||
<para>
|
||||
This function is restricted to superusers and members of
|
||||
the <literal>pg_monitor</literal> role by default, but other users can
|
||||
be granted EXECUTE to run the function.
|
||||
</para></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry role="func_table_entry"><para role="func_signature">
|
||||
<indexterm>
|
||||
@ -27498,78 +27571,6 @@ SELECT convert_from(pg_read_binary_file('file_in_utf8.txt'), 'UTF8');
|
||||
</para></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry role="func_table_entry"><para role="func_signature">
|
||||
<indexterm>
|
||||
<primary>pg_ls_logicalsnapdir</primary>
|
||||
</indexterm>
|
||||
<function>pg_ls_logicalsnapdir</function> ()
|
||||
<returnvalue>setof record</returnvalue>
|
||||
( <parameter>name</parameter> <type>text</type>,
|
||||
<parameter>size</parameter> <type>bigint</type>,
|
||||
<parameter>modification</parameter> <type>timestamp with time zone</type> )
|
||||
</para>
|
||||
<para>
|
||||
Returns the name, size, and last modification time (mtime) of each
|
||||
ordinary file in the server's <filename>pg_logical/snapshots</filename>
|
||||
directory. Filenames beginning with a dot, directories, and other
|
||||
special files are excluded.
|
||||
</para>
|
||||
<para>
|
||||
This function is restricted to superusers and members of
|
||||
the <literal>pg_monitor</literal> role by default, but other users can
|
||||
be granted EXECUTE to run the function.
|
||||
</para></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry role="func_table_entry"><para role="func_signature">
|
||||
<indexterm>
|
||||
<primary>pg_ls_logicalmapdir</primary>
|
||||
</indexterm>
|
||||
<function>pg_ls_logicalmapdir</function> ()
|
||||
<returnvalue>setof record</returnvalue>
|
||||
( <parameter>name</parameter> <type>text</type>,
|
||||
<parameter>size</parameter> <type>bigint</type>,
|
||||
<parameter>modification</parameter> <type>timestamp with time zone</type> )
|
||||
</para>
|
||||
<para>
|
||||
Returns the name, size, and last modification time (mtime) of each
|
||||
ordinary file in the server's <filename>pg_logical/mappings</filename>
|
||||
directory. Filenames beginning with a dot, directories, and other
|
||||
special files are excluded.
|
||||
</para>
|
||||
<para>
|
||||
This function is restricted to superusers and members of
|
||||
the <literal>pg_monitor</literal> role by default, but other users can
|
||||
be granted EXECUTE to run the function.
|
||||
</para></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry role="func_table_entry"><para role="func_signature">
|
||||
<indexterm>
|
||||
<primary>pg_ls_replslotdir</primary>
|
||||
</indexterm>
|
||||
<function>pg_ls_replslotdir</function> ( <parameter>slot_name</parameter> <type>text</type> )
|
||||
<returnvalue>setof record</returnvalue>
|
||||
( <parameter>name</parameter> <type>text</type>,
|
||||
<parameter>size</parameter> <type>bigint</type>,
|
||||
<parameter>modification</parameter> <type>timestamp with time zone</type> )
|
||||
</para>
|
||||
<para>
|
||||
Returns the name, size, and last modification time (mtime) of each
|
||||
ordinary file in the server's <filename>pg_replslot/slot_name</filename>
|
||||
directory, where <parameter>slot_name</parameter> is the name of the
|
||||
replication slot provided as input of the function. Filenames beginning
|
||||
with a dot, directories, and other special files are excluded.
|
||||
</para>
|
||||
<para>
|
||||
This function is restricted to superusers and members of
|
||||
the <literal>pg_monitor</literal> role by default, but other users can
|
||||
be granted EXECUTE to run the function.
|
||||
</para></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
@ -1489,22 +1489,6 @@
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id="glossary-startup-process">
|
||||
<glossterm>Startup process</glossterm>
|
||||
<glossdef>
|
||||
<para>
|
||||
An <glossterm linkend="glossary-auxiliary-proc">auxiliary process</glossterm>
|
||||
that replays WAL during crash recovery and in a
|
||||
<glossterm linkend="glossary-replication">physical replica</glossterm>.
|
||||
</para>
|
||||
<para>
|
||||
(The name is historical: the startup process was named before
|
||||
replication was implemented; the name refers to its task as it
|
||||
relates to the server startup following a crash.)
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id="glossary-sql-object">
|
||||
<glossterm>SQL object</glossterm>
|
||||
<glossdef>
|
||||
@ -1563,6 +1547,22 @@
|
||||
<glosssee otherterm="glossary-replica" />
|
||||
</glossentry>
|
||||
|
||||
<glossentry id="glossary-startup-process">
|
||||
<glossterm>Startup process</glossterm>
|
||||
<glossdef>
|
||||
<para>
|
||||
An <glossterm linkend="glossary-auxiliary-proc">auxiliary process</glossterm>
|
||||
that replays WAL during crash recovery and in a
|
||||
<glossterm linkend="glossary-replication">physical replica</glossterm>.
|
||||
</para>
|
||||
<para>
|
||||
(The name is historical: the startup process was named before
|
||||
replication was implemented; the name refers to its task as it
|
||||
relates to the server startup following a crash.)
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id="glossary-stats-collector">
|
||||
<glossterm>Stats collector (process)</glossterm>
|
||||
<glossdef>
|
||||
|
@ -253,7 +253,7 @@ typedef struct IndexAmRoutine
|
||||
access method blocks <acronym>HOT</acronym> when an indexed attribute is
|
||||
updated. Access methods without pointers to individual tuples (like
|
||||
<acronym>BRIN</acronym>) may allow <acronym>HOT</acronym> even in this
|
||||
case. This does not apply to attributes referenced in index predicates,
|
||||
case. This does not apply to attributes referenced in index predicates;
|
||||
an update of such attribute always disables <acronym>HOT</acronym>.
|
||||
</para>
|
||||
|
||||
|
@ -1337,7 +1337,7 @@ nd | {"1, 2": 33178, "1, 5": 33178, "2, 5": 27435, "1, 2, 5": 33178}
|
||||
<title>Multivariate MCV Lists</title>
|
||||
|
||||
<para>
|
||||
Another type of statistics stored for each column are most-common value
|
||||
Another type of statistic stored for each column are most-common value
|
||||
lists. This allows very accurate estimates for individual columns, but
|
||||
may result in significant misestimates for queries with conditions on
|
||||
multiple columns.
|
||||
|
@ -955,8 +955,8 @@ postgres=# SELECT postgres_fdw_disconnect_all();
|
||||
of any length and contain even non-ASCII characters. However when
|
||||
it's passed to and used as <varname>application_name</varname>
|
||||
in a foreign server, note that it will be truncated to less than
|
||||
<symbol>NAMEDATALEN</symbol> characters and any characters other
|
||||
than printable ASCII ones in it will be replaced with question
|
||||
<symbol>NAMEDATALEN</symbol> characters and anything other than
|
||||
than printable ASCII characters will be replaced with question
|
||||
marks (<literal>?</literal>).
|
||||
See <xref linkend="guc-application-name"/> for details.
|
||||
</para>
|
||||
@ -981,19 +981,19 @@ postgres=# SELECT postgres_fdw_disconnect_all();
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><literal>%a</literal></entry>
|
||||
<entry>Application name in local server</entry>
|
||||
<entry>Application name on local server</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%u</literal></entry>
|
||||
<entry>User name in local server</entry>
|
||||
<entry>User name on local server</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%d</literal></entry>
|
||||
<entry>Database name in local server</entry>
|
||||
<entry>Database name on local server</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%p</literal></entry>
|
||||
<entry>Process ID of backend in local server</entry>
|
||||
<entry>Process ID of backend on local server</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%%</literal></entry>
|
||||
|
@ -2101,7 +2101,7 @@ The commands accepted in replication mode are:
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Read some information associated to a replication slot. Returns a tuple
|
||||
Read some information associated with a replication slot. Returns a tuple
|
||||
with <literal>NULL</literal> values if the replication slot does not
|
||||
exist. This command is currently only supported for physical replication
|
||||
slots.
|
||||
@ -2133,7 +2133,7 @@ The commands accepted in replication mode are:
|
||||
<term><literal>restart_tli</literal> (<type>int8</type>)</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The timeline ID associated to <literal>restart_lsn</literal>,
|
||||
The timeline ID associated with <literal>restart_lsn</literal>,
|
||||
following the current timeline history.
|
||||
</para>
|
||||
</listitem>
|
||||
@ -2155,7 +2155,7 @@ The commands accepted in replication mode are:
|
||||
streaming starts on timeline <replaceable class="parameter">tli</replaceable>;
|
||||
otherwise, the server's current timeline is selected. The server can
|
||||
reply with an error, for example if the requested section of WAL has already
|
||||
been recycled. On success, server responds with a CopyBothResponse
|
||||
been recycled. On success, the server responds with a CopyBothResponse
|
||||
message, and then starts to stream WAL to the frontend.
|
||||
</para>
|
||||
|
||||
@ -2516,7 +2516,7 @@ The commands accepted in replication mode are:
|
||||
|
||||
<para>
|
||||
The server can reply with an error, for example if the
|
||||
slot does not exist. On success, server responds with a CopyBothResponse
|
||||
slot does not exist. On success, the server responds with a CopyBothResponse
|
||||
message, and then starts to stream WAL to the frontend.
|
||||
</para>
|
||||
|
||||
@ -6680,7 +6680,7 @@ not line breaks.
|
||||
<para>
|
||||
This section describes the detailed format of each logical replication
|
||||
message. These messages are either returned by the replication slot SQL
|
||||
interface or are sent by a walsender. In the case of a walsender they are
|
||||
interface or are sent by a walsender. In the case of a walsender, they are
|
||||
encapsulated inside replication protocol WAL messages as described in
|
||||
<xref linkend="protocol-replication"/>, and generally obey the same message
|
||||
flow as physical replication.
|
||||
|
@ -50,7 +50,7 @@ ALTER PUBLICATION <replaceable class="parameter">name</replaceable> RENAME TO <r
|
||||
tables/schemas that were present in the publication will be removed. The
|
||||
<literal>ADD</literal> and <literal>DROP</literal> clauses will add and
|
||||
remove one or more tables/schemas from the publication. Note that adding
|
||||
tables/schemas to a publication that is already subscribed to will require a
|
||||
tables/schemas to a publication that is already subscribed to will require an
|
||||
<literal>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</literal> action on the
|
||||
subscribing side in order to become effective.
|
||||
</para>
|
||||
@ -82,7 +82,7 @@ ALTER PUBLICATION <replaceable class="parameter">name</replaceable> RENAME TO <r
|
||||
<para>
|
||||
Adding/Setting a table that is part of schema specified in
|
||||
<literal>ALL TABLES IN SCHEMA</literal>, adding/setting a schema to a
|
||||
publication that already has a table that is part of specified schema or
|
||||
publication that already has a table that is part of the specified schema or
|
||||
adding/setting a table to a publication that already has a table's schema as
|
||||
part of the specified schema is not supported.
|
||||
</para>
|
||||
|
@ -131,9 +131,9 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
|
||||
|
||||
<para>
|
||||
When a partitioned table is published via schema level publication, all
|
||||
of its existing and future partitions irrespective of it being from the
|
||||
publication schema or not are implicitly considered to be part of the
|
||||
publication. So, even operations that are performed directly on a
|
||||
of its existing and future partitions are implicitly considered to be part of the
|
||||
publication, regardless of whether they are from the publication schema or not.
|
||||
So, even operations that are performed directly on a
|
||||
partition are also published via publications that its ancestors are
|
||||
part of.
|
||||
</para>
|
||||
@ -195,7 +195,7 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
|
||||
|
||||
<para>
|
||||
If <literal>FOR TABLE</literal>, <literal>FOR ALL TABLES</literal> or
|
||||
<literal>FOR ALL TABLES IN SCHEMA</literal> is not specified, then the
|
||||
<literal>FOR ALL TABLES IN SCHEMA</literal> are not specified, then the
|
||||
publication starts out with an empty set of tables. That is useful if
|
||||
tables or schemas are to be added later.
|
||||
</para>
|
||||
|
@ -82,9 +82,8 @@ PostgreSQL documentation
|
||||
<listitem>
|
||||
<para>
|
||||
First, scan the directory where the WAL segment files are written and
|
||||
find the newest completed segment file, using as starting point the
|
||||
beginning of the next WAL segment file. This is calculated independently
|
||||
on the compression method used to compress each segment.
|
||||
find the newest completed segment file, using as the starting point the
|
||||
beginning of the next WAL segment file.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
@ -93,7 +92,7 @@ PostgreSQL documentation
|
||||
If a starting point cannot be calculated with the previous method,
|
||||
and if a replication slot is used, an extra
|
||||
<command>READ_REPLICATION_SLOT</command> command is issued to retrieve
|
||||
the slot's <literal>restart_lsn</literal> to use as starting point.
|
||||
the slot's <literal>restart_lsn</literal> to use as the starting point.
|
||||
This option is only available when streaming write-ahead logs from
|
||||
<productname>PostgreSQL</productname> 15 and up.
|
||||
</para>
|
||||
@ -103,7 +102,7 @@ PostgreSQL documentation
|
||||
<para>
|
||||
If a starting point cannot be calculated with the previous method,
|
||||
the latest WAL flush location is used as reported by the server from
|
||||
a <literal>IDENTIFY_SYSTEM</literal> command.
|
||||
an <literal>IDENTIFY_SYSTEM</literal> command.
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
@ -268,7 +267,7 @@ PostgreSQL documentation
|
||||
<listitem>
|
||||
<para>
|
||||
Enables compression of write-ahead logs using the specified method.
|
||||
Supported values <literal>gzip</literal>, <literal>lz4</literal>
|
||||
Supported values are <literal>gzip</literal>, <literal>lz4</literal>
|
||||
(if <productname>PostgreSQL</productname> was compiled with
|
||||
<option>--with-lz4</option>), and <literal>none</literal>.
|
||||
</para>
|
||||
|
@ -220,8 +220,8 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
|
||||
data is generated in <command>pgbench</command> client and then
|
||||
sent to the server. This uses the client/server bandwidth
|
||||
extensively through a <command>COPY</command>.
|
||||
<command>pgbench</command> uses the FREEZE option with 14 or later
|
||||
versions of <productname>PostgreSQL</productname> to speed up
|
||||
<command>pgbench</command> uses the FREEZE option with version 14 or later
|
||||
of <productname>PostgreSQL</productname> to speed up
|
||||
subsequent <command>VACUUM</command>, unless partitions are enabled.
|
||||
Using <literal>g</literal> causes logging to print one message
|
||||
every 100,000 rows while generating data for the
|
||||
|
@ -139,7 +139,7 @@ PostgreSQL documentation
|
||||
of the upgraded cluster to be written safely to disk. This option
|
||||
causes <command>pg_upgrade</command> to return without waiting, which
|
||||
is faster, but means that a subsequent operating system crash can leave
|
||||
the synchronized data directory corrupt. Generally, this option is
|
||||
the data directory corrupt. Generally, this option is
|
||||
useful for testing but should not be used on a production
|
||||
installation.
|
||||
</para>
|
||||
|
@ -107,7 +107,7 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replac
|
||||
|
||||
<para>
|
||||
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 specifying properties like a table's access
|
||||
method with <xref linkend="sql-createtable-method" /> or the table's
|
||||
tablespace with <xref linkend="sql-createtable-tablespace" />. Use
|
||||
<command>CREATE TABLE AS</command> if necessary. Therefore, the default table
|
||||
|
Reference in New Issue
Block a user