Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 609b065

Browse files
committed
Fix typos and grammar in documentation and code comments
Comment fixes are applied on HEAD, and documentation improvements are applied on back-branches where needed. Author: Justin Pryzby Discussion: https://postgr.es/m/20210408164008.GJ6592@telsasoft.com Backpatch-through: 9.6
1 parent 796092f commit 609b065

23 files changed

+53
-52
lines changed

doc/src/sgml/config.sgml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2723,7 +2723,7 @@ include_dir 'conf.d'
27232723
Note that changing <varname>wal_level</varname> to
27242724
<literal>minimal</literal> makes any base backups taken before
27252725
unavailable for archive recovery and standby server, which may
2726-
lead to database loss.
2726+
lead to data loss.
27272727
</para>
27282728
<para>
27292729
In <literal>logical</literal> level, the same information is logged as
@@ -3098,7 +3098,7 @@ include_dir 'conf.d'
30983098
<listitem>
30993099
<para>
31003100
When this parameter is <literal>on</literal>, the <productname>PostgreSQL</productname>
3101-
server compresses a full page image written to WAL when
3101+
server compresses full page images written to WAL when
31023102
<xref linkend="guc-full-page-writes"/> is on or during a base backup.
31033103
A compressed page image will be decompressed during WAL replay.
31043104
The default value is <literal>off</literal>.
@@ -4137,7 +4137,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
41374137
On the subscriber side, specifies how many replication origins (see
41384138
<xref linkend="replication-origins"/>) can be tracked simultaneously,
41394139
effectively limiting how many logical replication subscriptions can
4140-
be created on the server. Setting it a lower value than the current
4140+
be created on the server. Setting it to a lower value than the current
41414141
number of tracked replication origins (reflected in
41424142
<link linkend="view-pg-replication-origin-status">pg_replication_origin_status</link>,
41434143
not <link linkend="catalog-pg-replication-origin">pg_replication_origin</link>)
@@ -7732,12 +7732,12 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
77327732
The <xref linkend="pgstatstatements"/> extension also requires a query
77337733
identifier to be computed. Note that an external module can
77347734
alternatively be used if the in-core query identifier computation
7735-
specification isn't acceptable. In this case, in-core computation
7735+
method is not acceptable. In this case, in-core computation
77367736
must be disabled. The default is <literal>off</literal>.
77377737
</para>
77387738
<note>
77397739
<para>
7740-
To ensure that a only one query identifier is calculated and
7740+
To ensure that only one query identifier is calculated and
77417741
displayed, extensions that calculate query identifiers should
77427742
throw an error if a query identifier has already been computed.
77437743
</para>

doc/src/sgml/func.sgml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3560,7 +3560,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
35603560
<returnvalue>text</returnvalue>
35613561
</para>
35623562
<para>
3563-
Evaluate escaped Unicode characters in argument. Unicode characters
3563+
Evaluate escaped Unicode characters in the argument. Unicode characters
35643564
can be specified as
35653565
<literal>\<replaceable>XXXX</replaceable></literal> (4 hexadecimal
35663566
digits), <literal>\+<replaceable>XXXXXX</replaceable></literal> (6
@@ -24926,12 +24926,12 @@ SELECT collation for ('foo' COLLATE "de_DE");
2492624926
<returnvalue>boolean</returnvalue>
2492724927
</para>
2492824928
<para>
24929-
Requests to log the memory contexts whose backend process has
24930-
the specified process ID. These memory contexts will be logged at
24929+
Requests to log the memory contexts of the backend with the
24930+
specified process ID. These memory contexts will be logged at
2493124931
<literal>LOG</literal> message level. They will appear in
2493224932
the server log based on the log configuration set
2493324933
(See <xref linkend="runtime-config-logging"/> for more information),
24934-
but will not be sent to the client whatever the setting of
24934+
but will not be sent to the client regardless of
2493524935
<xref linkend="guc-client-min-messages"/>.
2493624936
Only superusers can request to log the memory contexts.
2493724937
</para></entry>
@@ -25037,7 +25037,7 @@ SELECT collation for ('foo' COLLATE "de_DE");
2503725037

2503825038
<para>
2503925039
<function>pg_log_backend_memory_contexts</function> can be used
25040-
to log the memory contexts of the backend process. For example,
25040+
to log the memory contexts of a backend process. For example:
2504125041
<programlisting>
2504225042
postgres=# SELECT pg_log_backend_memory_contexts(pg_backend_pid());
2504325043
pg_log_backend_memory_contexts
@@ -25061,8 +25061,8 @@ LOG: level: 1; TransactionAbortContext: 32768 total in 1 blocks; 32504 free (0
2506125061
LOG: level: 1; ErrorContext: 8192 total in 1 blocks; 7928 free (3 chunks); 264 used
2506225062
LOG: Grand total: 1651920 bytes in 201 blocks; 622360 free (88 chunks); 1029560 used
2506325063
</screen>
25064-
For more than 100 child contexts under the same parent one,
25065-
100 child contexts and a summary of the remaining ones will be logged.
25064+
If there are more than 100 child contexts under the same parent, the first
25065+
100 child contexts are logged, along with a summary of the remaining contexts.
2506625066
Note that frequent calls to this function could incur significant overhead,
2506725067
because it may generate a large number of log messages.
2506825068
</para>
@@ -25576,7 +25576,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup());
2557625576
Returns recovery pause state. The return values are <literal>
2557725577
not paused</literal> if pause is not requested, <literal>
2557825578
pause requested</literal> if pause is requested but recovery is
25579-
not yet paused and, <literal>paused</literal> if the recovery is
25579+
not yet paused, and <literal>paused</literal> if the recovery is
2558025580
actually paused.
2558125581
</para></entry>
2558225582
</row>

doc/src/sgml/logical-replication.sgml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -490,9 +490,9 @@
490490
any changes that happened during the initial data copy using standard
491491
logical replication. During this synchronization phase, the changes
492492
are applied and committed in the same order as they happened on the
493-
publisher. Once the synchronization is done, the control of the
493+
publisher. Once synchronization is done, control of the
494494
replication of the table is given back to the main apply process where
495-
the replication continues as normal.
495+
replication continues as normal.
496496
</para>
497497
</sect2>
498498
</sect1>
@@ -602,10 +602,9 @@
602602
</para>
603603

604604
<para>
605-
The subscriber also requires the <varname>max_replication_slots</varname>
606-
be set to configure how many replication origins can be tracked. In this
607-
case it should be set to at least the number of subscriptions that will be
608-
added to the subscriber, plus some reserve for table synchronization.
605+
<varname>max_replication_slots</varname> must also be set on the subscriber.
606+
It should be set to at least the number of subscriptions that will be added
607+
to the subscriber, plus some reserve for table synchronization.
609608
<varname>max_logical_replication_workers</varname> must be set to at least
610609
the number of subscriptions, again plus some reserve for the table
611610
synchronization. Additionally the <varname>max_worker_processes</varname>

doc/src/sgml/maintenance.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
never issue <command>VACUUM FULL</command>. In this approach, the idea
186186
is not to keep tables at their minimum size, but to maintain steady-state
187187
usage of disk space: each table occupies space equivalent to its
188-
minimum size plus however much space gets used up between vacuumings.
188+
minimum size plus however much space gets used up between vacuum runs.
189189
Although <command>VACUUM FULL</command> can be used to shrink a table back
190190
to its minimum size and return the disk space to the operating system,
191191
there is not much point in this if the table will just grow again in the

doc/src/sgml/monitoring.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5890,7 +5890,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
58905890
</para>
58915891
<para>
58925892
When creating an index on a partitioned table, this column is set to
5893-
the number of partitions on which the index has been completed.
5893+
the number of partitions on which the index has been created.
58945894
This field is <literal>0</literal> during a <literal>REINDEX</literal>.
58955895
</para></entry>
58965896
</row>

doc/src/sgml/perform.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,7 +1747,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
17471747
<xref linkend="guc-max-wal-senders"/> to zero.
17481748
But note that changing these settings requires a server restart,
17491749
and makes any base backups taken before unavailable for archive
1750-
recovery and standby server, which may lead to database loss.
1750+
recovery and standby server, which may lead to data loss.
17511751
</para>
17521752

17531753
<para>
@@ -1899,7 +1899,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
18991899
much faster. The following are configuration changes you can make
19001900
to improve performance in such cases. Except as noted below, durability
19011901
is still guaranteed in case of a crash of the database software;
1902-
only abrupt operating system stoppage creates a risk of data loss
1902+
only an abrupt operating system crash creates a risk of data loss
19031903
or corruption when these settings are used.
19041904

19051905
<itemizedlist>

doc/src/sgml/pgstatstatements.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@
406406
<note>
407407
<para>
408408
The following details about constant replacement and
409-
<structfield>queryid</structfield> only applies when <xref
409+
<structfield>queryid</structfield> only apply when <xref
410410
linkend="guc-compute-query-id"/> is enabled. If you use an external
411411
module instead to compute <structfield>queryid</structfield>, you
412412
should refer to its documentation for details.

doc/src/sgml/postgres-fdw.sgml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -551,8 +551,9 @@ OPTIONS (ADD password_required 'false');
551551
<title>Connection Management Options</title>
552552

553553
<para>
554-
By default all the open connections that <filename>postgres_fdw</filename>
555-
established to the foreign servers are kept in local session for re-use.
554+
By default, all connections that <filename>postgres_fdw</filename>
555+
establishes to foreign servers are kept open in the local session
556+
for re-use.
556557
</para>
557558

558559
<variablelist>
@@ -562,11 +563,11 @@ OPTIONS (ADD password_required 'false');
562563
<listitem>
563564
<para>
564565
This option controls whether <filename>postgres_fdw</filename> keeps
565-
the connections to the foreign server open so that the subsequent
566+
the connections to the foreign server open so that subsequent
566567
queries can re-use them. It can only be specified for a foreign server.
567568
The default is <literal>on</literal>. If set to <literal>off</literal>,
568569
all connections to this foreign server will be discarded at the end of
569-
transaction.
570+
each transaction.
570571
</para>
571572
</listitem>
572573
</varlistentry>

doc/src/sgml/ref/create_table.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,7 +1520,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
15201520
</listitem>
15211521
</varlistentry>
15221522

1523-
<varlistentry id="reloption-autovacuum-vauum-scale-factor" xreflabel="autovacuum_vacuum_scale_factor">
1523+
<varlistentry id="reloption-autovacuum-vacuum-scale-factor" xreflabel="autovacuum_vacuum_scale_factor">
15241524
<term><literal>autovacuum_vacuum_scale_factor</literal>, <literal>toast.autovacuum_vacuum_scale_factor</literal> (<type>floating point</type>)
15251525
<indexterm>
15261526
<primary><varname>autovacuum_vacuum_scale_factor</varname> </primary>
@@ -1610,7 +1610,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
16101610
</listitem>
16111611
</varlistentry>
16121612

1613-
<varlistentry id="reloption-autovacuum-vauum-cost-limit" xreflabel="autovacuum_vacuum_cost_limit">
1613+
<varlistentry id="reloption-autovacuum-vacuum-cost-limit" xreflabel="autovacuum_vacuum_cost_limit">
16141614
<term><literal>autovacuum_vacuum_cost_limit</literal>, <literal>toast.autovacuum_vacuum_cost_limit</literal> (<type>integer</type>)
16151615
<indexterm>
16161616
<primary><varname>autovacuum_vacuum_cost_limit</varname></primary>

doc/src/sgml/ref/createuser.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ PostgreSQL documentation
4444
If you wish to create a new superuser, you must connect as a
4545
superuser, not merely with <literal>CREATEROLE</literal> privilege.
4646
Being a superuser implies the ability to bypass all access permission
47-
checks within the database, so superuserdom should not be granted lightly.
47+
checks within the database, so superuser access should not be granted lightly.
4848
</para>
4949

5050
<para>

doc/src/sgml/ref/declare.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ DECLARE liahona CURSOR FOR SELECT * FROM films;
335335
<para>
336336
According to the SQL standard, changes made to insensitive cursors by
337337
<literal>UPDATE ... WHERE CURRENT OF</literal> and <literal>DELETE
338-
... WHERE CURRENT OF</literal> statements are visibible in that same
338+
... WHERE CURRENT OF</literal> statements are visible in that same
339339
cursor. <productname>PostgreSQL</productname> treats these statements like
340340
all other data changing statements in that they are not visible in
341341
insensitive cursors.

doc/src/sgml/ref/pg_amcheck.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ PostgreSQL documentation
460460
<term><option>--skip=<replaceable class="parameter">option</replaceable></option></term>
461461
<listitem>
462462
<para>
463-
If <literal>"all-frozen"</literal> is given, table corruption checks
463+
If <literal>all-frozen</literal> is given, table corruption checks
464464
will skip over pages in all tables that are marked as all frozen.
465465
</para>
466466
<para>

doc/src/sgml/ref/psql-ref.sgml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1927,9 +1927,10 @@ testdb=&gt;
19271927
</para>
19281928

19291929
<para>
1930-
The column of the kind of extended stats (e.g. Ndistinct) shows its status.
1931-
NULL means that it doesn't exists. "defined" means that it was requested
1932-
when creating the statistics.
1930+
The status of each kind of extended statistics is shown in a column
1931+
named after its statistic kind (e.g. Ndistinct).
1932+
"defined" means that it was requested when creating the statistics,
1933+
and NULL means it wasn't requested.
19331934
You can use pg_stats_ext if you'd like to know whether <link linkend="sql-analyze">
19341935
<command>ANALYZE</command></link> was run and statistics are available to the
19351936
planner.

doc/src/sgml/wal.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@
797797
<literal>fsync</literal>, or <literal>fsync_writethrough</literal>,
798798
the write operation moves WAL buffers to kernel cache and
799799
<function>issue_xlog_fsync</function> syncs them to disk. Regardless
800-
of the setting of <varname>track_wal_io_timing</varname>, the numbers
800+
of the setting of <varname>track_wal_io_timing</varname>, the number
801801
of times <function>XLogWrite</function> writes and
802802
<function>issue_xlog_fsync</function> syncs WAL data to disk are also
803803
counted as <literal>wal_write</literal> and <literal>wal_sync</literal>

src/backend/catalog/heap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,7 @@ AddNewRelationType(const char *typeName,
11191119
* reltypeid: OID to assign to rel's rowtype, or InvalidOid to select one
11201120
* reloftypeid: if a typed table, OID of underlying type; else InvalidOid
11211121
* ownerid: OID of new rel's owner
1122+
* accessmtd: OID of new rel's access method
11221123
* tupdesc: tuple descriptor (source of column definitions)
11231124
* cooked_constraints: list of precooked check constraints and defaults
11241125
* relkind: relkind for new rel

src/backend/commands/analyze.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
617617
*
618618
* We assume that VACUUM hasn't set pg_class.reltuples already, even
619619
* during a VACUUM ANALYZE. Although VACUUM often updates pg_class,
620-
* exceptions exists. A "VACUUM (ANALYZE, INDEX_CLEANUP OFF)" command
620+
* exceptions exist. A "VACUUM (ANALYZE, INDEX_CLEANUP OFF)" command
621621
* will never update pg_class entries for index relations. It's also
622622
* possible that an individual index's pg_class entry won't be updated
623623
* during VACUUM if the index AM returns NULL from its amvacuumcleanup()

src/backend/commands/cluster.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,7 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,
14221422
PROGRESS_CLUSTER_PHASE_FINAL_CLEANUP);
14231423

14241424
/*
1425-
* If the relation being rebuild is pg_class, swap_relation_files()
1425+
* If the relation being rebuilt is pg_class, swap_relation_files()
14261426
* couldn't update pg_class's own pg_class entry (check comments in
14271427
* swap_relation_files()), thus relfrozenxid was not updated. That's
14281428
* annoying because a potential reason for doing a VACUUM FULL is a

src/backend/commands/copyfrom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ CopyMultiInsertBufferCleanup(CopyMultiInsertInfo *miinfo,
410410
* Once flushed we also trim the tracked buffers list down to size by removing
411411
* the buffers created earliest first.
412412
*
413-
* Callers should pass 'curr_rri' is the ResultRelInfo that's currently being
413+
* Callers should pass 'curr_rri' as the ResultRelInfo that's currently being
414414
* used. When cleaning up old buffers we'll never remove the one for
415415
* 'curr_rri'.
416416
*/

src/backend/statistics/extended_stats.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ BuildRelationExtStatistics(Relation onerel, double totalrows,
254254
* that would require additional columns.
255255
*
256256
* See statext_compute_stattarget for details about how we compute statistics
257-
* target for a statistics objects (from the object target, attribute targets
257+
* target for a statistics object (from the object target, attribute targets
258258
* and default statistics target).
259259
*/
260260
int

src/backend/utils/adt/jsonfuncs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,7 +1651,7 @@ push_null_elements(JsonbParseState **ps, int num)
16511651
* this path. E.g. the path [a][0][b] with the new value 1 will produce the
16521652
* structure {a: [{b: 1}]}.
16531653
*
1654-
* Called is responsible to make sure such path does not exist yet.
1654+
* Caller is responsible to make sure such path does not exist yet.
16551655
*/
16561656
static void
16571657
push_path(JsonbParseState **st, int level, Datum *path_elems,
@@ -4887,7 +4887,7 @@ IteratorConcat(JsonbIterator **it1, JsonbIterator **it2,
48874887
* than just one last element, this flag will instruct to create the whole
48884888
* chain of corresponding objects and insert the value.
48894889
*
4890-
* JB_PATH_CONSISTENT_POSITION for an array indicates that the called wants to
4890+
* JB_PATH_CONSISTENT_POSITION for an array indicates that the caller wants to
48914891
* keep values with fixed indices. Indices for existing elements could be
48924892
* changed (shifted forward) in case if the array is prepended with a new value
48934893
* and a negative index out of the range, so this behavior will be prevented

src/bin/pg_amcheck/t/004_verify_heapam.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ sub write_tuple
175175
seek($fh, $offset, 0)
176176
or BAIL_OUT("seek failed: $!");
177177
defined(syswrite($fh, $buffer, HEAPTUPLE_PACK_LENGTH))
178-
or BAIL_OUT("syswrite failed: $!");;
178+
or BAIL_OUT("syswrite failed: $!");
179179
return;
180180
}
181181

src/include/lib/sort_template.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ ST_SCOPE void ST_SORT(ST_ELEMENT_TYPE *first, size_t n
241241

242242
/*
243243
* Find the median of three values. Currently, performance seems to be best
244-
* if the the comparator is inlined here, but the med3 function is not inlined
244+
* if the comparator is inlined here, but the med3 function is not inlined
245245
* in the qsort function.
246246
*/
247247
static pg_noinline ST_ELEMENT_TYPE *

src/include/utils/guc.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,12 @@ typedef enum
9090
* dividing line between "interactive" and "non-interactive" sources for
9191
* error reporting purposes.
9292
*
93-
* PGC_S_TEST is used when testing values to be used later ("doit" will always
94-
* be false, so this never gets stored as the actual source of any value).
95-
* For example, ALTER DATABASE/ROLE tests proposed per-database or per-user
96-
* defaults this way, and CREATE FUNCTION tests proposed function SET clauses
97-
* this way. This is an interactive case, but it needs its own source value
98-
* because some assign hooks need to make different validity checks in this
99-
* case. In particular, references to nonexistent database objects generally
93+
* PGC_S_TEST is used when testing values to be used later. For example,
94+
* ALTER DATABASE/ROLE tests proposed per-database or per-user defaults this
95+
* way, and CREATE FUNCTION tests proposed function SET clauses this way.
96+
* This is an interactive case, but it needs its own source value because
97+
* some assign hooks need to make different validity checks in this case.
98+
* In particular, references to nonexistent database objects generally
10099
* shouldn't throw hard errors in this case, at most NOTICEs, since the
101100
* objects might exist by the time the setting is used for real.
102101
*

0 commit comments

Comments
 (0)