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

Commit 6c9fb69

Browse files
committed
doc: improve docs so config value default units are clearer
Previously, our docs would say "Specifies the number of milliseconds" but it wasn't clear that "milliseconds" was merely the default unit. New text says "Specifies duration (defaults to milliseconds)", which is clearer. Reported-by: basil.bourque@gmail.com Discussion: https://postgr.es/m/15912-2e35e9026f61230b@postgresql.org Backpatch-through: 12
1 parent 38d8dce commit 6c9fb69

File tree

1 file changed

+39
-34
lines changed

1 file changed

+39
-34
lines changed

doc/src/sgml/config.sgml

+39-34
Original file line numberDiff line numberDiff line change
@@ -883,9 +883,9 @@ include_dir 'conf.d'
883883
</term>
884884
<listitem>
885885
<para>
886-
Specifies the number of seconds of inactivity after which TCP
887-
should send a keepalive message to the client. A value of 0 uses
888-
the system default.
886+
Specifies the duration of inactivity after which TCP should
887+
send a keepalive message to the client (defaults to seconds).
888+
A value of 0 uses the system default.
889889
This parameter is supported only on systems that support
890890
<symbol>TCP_KEEPIDLE</symbol> or an equivalent socket option, and on
891891
Windows; on other systems, it must be zero.
@@ -909,8 +909,9 @@ include_dir 'conf.d'
909909
</term>
910910
<listitem>
911911
<para>
912-
Specifies the number of seconds after which a TCP keepalive message
913-
that is not acknowledged by the client should be retransmitted.
912+
Specifies the duration after which a TCP keepalive message
913+
that is not acknowledged by the client should be retransmitted
914+
(defaults to seconds).
914915
A value of 0 uses the system default.
915916
This parameter is supported only on systems that support
916917
<symbol>TCP_KEEPINTVL</symbol> or an equivalent socket option, and on
@@ -960,7 +961,7 @@ include_dir 'conf.d'
960961
</term>
961962
<listitem>
962963
<para>
963-
Specifies the number of milliseconds that transmitted data may
964+
Specifies duration (defaults to milliseconds) that transmitted data may
964965
remain unacknowledged before a connection is forcibly closed.
965966
A value of 0 uses the system default.
966967
This parameter is supported only on systems that support
@@ -995,7 +996,7 @@ include_dir 'conf.d'
995996

996997
<listitem>
997998
<para>
998-
Maximum time to complete client authentication, in seconds. If a
999+
Maximum duration to complete client authentication (defaults to seconds). If a
9991000
would-be client has not completed the authentication protocol in
10001001
this much time, the server closes the connection. This prevents
10011002
hung clients from occupying a connection indefinitely.
@@ -1818,7 +1819,7 @@ include_dir 'conf.d'
18181819
for temporary files, such as sort and hash temporary files, or the
18191820
storage file for a held cursor. A transaction attempting to exceed
18201821
this limit will be canceled.
1821-
The value is specified in kilobytes, and <literal>-1</literal> (the
1822+
The default unit is kilobytes, and <literal>-1</literal> (the
18221823
default) means no limit.
18231824
Only superusers can change this setting.
18241825
</para>
@@ -1906,7 +1907,7 @@ include_dir 'conf.d'
19061907
</term>
19071908
<listitem>
19081909
<para>
1909-
The length of time, in milliseconds, that the process will sleep
1910+
The duration (defaults to milliseconds) that the process will sleep
19101911
when the cost limit has been exceeded.
19111912
The default value is zero, which disables the cost-based vacuum
19121913
delay feature. Positive values enable cost-based vacuuming.
@@ -2031,11 +2032,11 @@ include_dir 'conf.d'
20312032
</term>
20322033
<listitem>
20332034
<para>
2034-
Specifies the delay between activity rounds for the
2035+
Specifies the delay (defaults to milliseconds) between activity rounds for the
20352036
background writer. In each round the writer issues writes
20362037
for some number of dirty buffers (controllable by the
20372038
following parameters). It then sleeps for <varname>bgwriter_delay</varname>
2038-
milliseconds, and repeats. When there are no dirty buffers in the
2039+
duration, and repeats. When there are no dirty buffers in the
20392040
buffer pool, though, it goes into a longer sleep regardless of
20402041
<varname>bgwriter_delay</varname>. The default value is 200
20412042
milliseconds (<literal>200ms</literal>). Note that on many systems, the
@@ -2794,9 +2795,10 @@ include_dir 'conf.d'
27942795
<listitem>
27952796
<para>
27962797
Specifies how often the WAL writer flushes WAL. After flushing WAL it
2797-
sleeps for <varname>wal_writer_delay</varname> milliseconds, unless woken up
2798+
sleeps for <varname>wal_writer_delay</varname> duration (defaults
2799+
to milliseconds), unless woken up
27982800
by an asynchronously committing transaction. If the last flush
2799-
happened less than <varname>wal_writer_delay</varname> milliseconds ago and
2801+
happened less than <varname>wal_writer_delay</varname> duration ago and
28002802
less than <varname>wal_writer_flush_after</varname> bytes of WAL have been
28012803
produced since, then WAL is only written to the operating system, not
28022804
flushed to disk.
@@ -2819,7 +2821,8 @@ include_dir 'conf.d'
28192821
<listitem>
28202822
<para>
28212823
Specifies how often the WAL writer flushes WAL. If the last flush
2822-
happened less than <varname>wal_writer_delay</varname> milliseconds ago and
2824+
happened less than <varname>wal_writer_delay</varname> duration ago
2825+
(defaults to milliseconds) and
28232826
less than <varname>wal_writer_flush_after</varname> bytes of WAL have been
28242827
produced since, then WAL is only written to the operating system, not
28252828
flushed to disk. If <varname>wal_writer_flush_after</varname> is set
@@ -2897,7 +2900,7 @@ include_dir 'conf.d'
28972900
</term>
28982901
<listitem>
28992902
<para>
2900-
Maximum time between automatic WAL checkpoints, in seconds.
2903+
Maximum duration between automatic WAL checkpoints (defaults to seconds).
29012904
The valid range is between 30 seconds and one day.
29022905
The default is five minutes (<literal>5min</literal>).
29032906
Increasing this parameter can increase the amount of time needed
@@ -3672,7 +3675,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
36723675
<listitem>
36733676
<para>
36743677
Terminate replication connections that are inactive longer
3675-
than the specified number of milliseconds. This is useful for
3678+
than the specified duration (defaults to milliseconds). This is useful for
36763679
the sending server to detect a standby crash or network outage.
36773680
A value of zero disables the timeout mechanism. The default value
36783681
is 60 seconds. With a cluster distributed across multiple geographic
@@ -4124,7 +4127,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
41244127
<listitem>
41254128
<para>
41264129
Terminate replication connections that are inactive longer
4127-
than the specified number of milliseconds. This is useful for
4130+
than the specified duration (defaults to milliseconds). This is useful for
41284131
the receiving standby server to detect a primary node crash or network
41294132
outage.
41304133
A value of zero disables the timeout mechanism. This parameter
@@ -5617,7 +5620,7 @@ local0.* /var/log/postgresql
56175620
<para>
56185621
When <varname>logging_collector</varname> is enabled,
56195622
this parameter determines the maximum size of an individual log file.
5620-
After this many kilobytes have been emitted into a log file,
5623+
After this many bytes (default units is kilobytes) have been emitted into a log file,
56215624
a new log file will be created. Set to zero to disable size-based
56225625
creation of new log files.
56235626
This parameter can only be set in the <filename>postgresql.conf</filename>
@@ -5860,8 +5863,8 @@ local0.* /var/log/postgresql
58605863
<listitem>
58615864
<para>
58625865
Causes the duration of each completed statement to be logged
5863-
if the statement ran for at least the specified number of
5864-
milliseconds. Setting this to zero prints all statement durations.
5866+
if the statement ran for at least the specified duration (defaults
5867+
to milliseconds). Setting this to zero prints all statement durations.
58655868
Minus-one (the default) disables logging statement durations.
58665869
For example, if you set it to <literal>250ms</literal>
58675870
then all SQL statements that run 250ms or longer will be
@@ -6487,7 +6490,7 @@ log_line_prefix = '%m [%p] %q%u@%d/%a '
64876490
A log entry is made for each temporary file when it is deleted.
64886491
A value of zero logs all temporary file information, while positive
64896492
values log only files whose size is greater than or equal to
6490-
the specified number of kilobytes. The
6493+
the specified number of bytes (default units is kilobytes). The
64916494
default setting is -1, which disables such logging.
64926495
Only superusers can change this setting.
64936496
</para>
@@ -6935,7 +6938,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
69356938
<listitem>
69366939
<para>
69376940
Causes each action executed by autovacuum to be logged if it ran for at
6938-
least the specified number of milliseconds. Setting this to zero logs
6941+
least the specified duration (defaults to milliseconds). Setting this to zero logs
69396942
all autovacuum actions. <literal>-1</literal> (the default) disables
69406943
logging autovacuum actions. For example, if you set this to
69416944
<literal>250ms</literal> then all automatic vacuums and analyzes that run
@@ -7588,8 +7591,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
75887591
</term>
75897592
<listitem>
75907593
<para>
7591-
Abort any statement that takes more than the specified number of
7592-
milliseconds, starting from the time the command arrives at the server
7594+
Abort any statement that takes more than the specified duration
7595+
(defaults to milliseconds), starting from the time the command arrives at the server
75937596
from the client. If <varname>log_min_error_statement</varname> is set to
75947597
<literal>ERROR</literal> or lower, the statement that timed out will also be
75957598
logged. A value of zero (the default) turns this off.
@@ -7611,8 +7614,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
76117614
</term>
76127615
<listitem>
76137616
<para>
7614-
Abort any statement that waits longer than the specified number of
7615-
milliseconds while attempting to acquire a lock on a table, index,
7617+
Abort any statement that waits longer than the specified duration
7618+
(defaults to milliseconds) while attempting to acquire a lock on a table, index,
76167619
row, or other database object. The time limit applies separately to
76177620
each lock acquisition attempt. The limit applies both to explicit
76187621
locking requests (such as <command>LOCK TABLE</command>, or <command>SELECT
@@ -7647,7 +7650,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
76477650
<listitem>
76487651
<para>
76497652
Terminate any session with an open transaction that has been idle for
7650-
longer than the specified duration in milliseconds. This allows any
7653+
longer than the specified duration (defaults to milliseconds). This allows any
76517654
locks held by that session to be released and the connection slot to be reused;
76527655
it also allows tuples visible only to this transaction to be vacuumed. See
76537656
<xref linkend="routine-vacuuming"/> for more details about this.
@@ -8484,7 +8487,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
84848487
</term>
84858488
<listitem>
84868489
<para>
8487-
This is the amount of time, in milliseconds, to wait on a lock
8490+
This is the duration (defaults to milliseconds), to wait on a lock
84888491
before checking to see if there is a deadlock condition. The
84898492
check for deadlock is relatively expensive, so the server doesn't run
84908493
it every time it waits for a lock. We optimistically assume
@@ -8503,7 +8506,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
85038506

85048507
<para>
85058508
When <xref linkend="guc-log-lock-waits"/> is set,
8506-
this parameter also determines the length of time to wait before
8509+
this parameter also determines the duration to wait before
85078510
a log message is issued about the lock wait. If you are trying
85088511
to investigate locking delays you might want to set a shorter than
85098512
normal <varname>deadlock_timeout</varname>.
@@ -9321,11 +9324,12 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
93219324
</term>
93229325
<listitem>
93239326
<para>
9324-
If nonzero, a delay of this many seconds occurs when a new
9327+
If nonzero, a delay of this duration occurs when a new
93259328
server process is started, after it conducts the
93269329
authentication procedure. This is intended to give developers an
93279330
opportunity to attach to the server process with a debugger.
9328-
This parameter cannot be changed after session start.
9331+
This parameter defaults to seconds and cannot be changed after
9332+
session start.
93299333
</para>
93309334
</listitem>
93319335
</varlistentry>
@@ -9338,13 +9342,14 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
93389342
</term>
93399343
<listitem>
93409344
<para>
9341-
If nonzero, a delay of this many seconds occurs just after a
9345+
If nonzero, a delay of this duration occurs just after a
93429346
new server process is forked, before it conducts the
93439347
authentication procedure. This is intended to give developers an
93449348
opportunity to attach to the server process with a debugger to
93459349
trace down misbehavior in authentication.
9346-
This parameter can only be set in the <filename>postgresql.conf</filename>
9347-
file or on the server command line.
9350+
This parameter defaults to seconds and can only be set in the
9351+
<filename>postgresql.conf</filename> file or on the server
9352+
command line.
93489353
</para>
93499354
</listitem>
93509355
</varlistentry>

0 commit comments

Comments
 (0)