aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/backup.sgml2
-rw-r--r--doc/src/sgml/catalogs.sgml2
-rw-r--r--doc/src/sgml/charset.sgml2
-rw-r--r--doc/src/sgml/client-auth.sgml16
-rw-r--r--doc/src/sgml/config.sgml10
-rw-r--r--doc/src/sgml/func.sgml8
-rw-r--r--doc/src/sgml/libpq.sgml24
-rw-r--r--doc/src/sgml/monitoring.sgml4
-rw-r--r--doc/src/sgml/protocol.sgml35
-rw-r--r--doc/src/sgml/query.sgml14
-rw-r--r--doc/src/sgml/ref/checkpoint.sgml68
-rw-r--r--doc/src/sgml/ref/create_database.sgml45
-rw-r--r--doc/src/sgml/ref/createdb.sgml3
-rw-r--r--doc/src/sgml/ref/pg_basebackup.sgml3
-rw-r--r--doc/src/sgml/ref/pgtesttiming.sgml2
-rw-r--r--doc/src/sgml/ref/psql-ref.sgml9
-rw-r--r--doc/src/sgml/system-views.sgml76
17 files changed, 257 insertions, 66 deletions
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 25b8904baf7..5f7489afbd1 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -991,7 +991,7 @@ SELECT pg_backup_start(label => 'label', fast => false);
usually preferable as it minimizes the impact on the running system. If you
want to start the backup as soon as possible, pass <literal>true</literal> as
the second parameter to <function>pg_backup_start</function> and it will
- request an immediate checkpoint, which will finish as fast as possible using
+ request a fast checkpoint, which will finish as fast as possible using
as much I/O as possible.
</para>
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index aa5b8772436..0d23bc1b122 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -3158,7 +3158,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
<structfield>datcollate</structfield> <type>text</type>
</para>
<para>
- LC_COLLATE for this database
+ LC_COLLATE for this database (ignored unless <structfield>datlocprovider</structfield> is <literal>c</literal>)
</para></entry>
</row>
diff --git a/doc/src/sgml/charset.sgml b/doc/src/sgml/charset.sgml
index 5a0e97f6f31..59b27c3c370 100644
--- a/doc/src/sgml/charset.sgml
+++ b/doc/src/sgml/charset.sgml
@@ -100,7 +100,7 @@ initdb --locale=sv_SE
<tbody>
<row>
<entry><envar>LC_COLLATE</envar></entry>
- <entry>String sort order</entry>
+ <entry>String sort order (ignored unless the provider is <literal>libc</literal>)</entry>
</row>
<row>
<entry><envar>LC_CTYPE</envar></entry>
diff --git a/doc/src/sgml/client-auth.sgml b/doc/src/sgml/client-auth.sgml
index 832b616a7bb..51b95ed04f3 100644
--- a/doc/src/sgml/client-auth.sgml
+++ b/doc/src/sgml/client-auth.sgml
@@ -1003,8 +1003,9 @@ local db1,db2,@demodbs all md5
the remainder of the field is treated as a regular expression.
(See <xref linkend="posix-syntax-details"/> for details of
<productname>PostgreSQL</productname>'s regular expression syntax.) The regular
- expression can include a single capture, or parenthesized subexpression,
- which can then be referenced in the <replaceable>database-username</replaceable>
+ expression can include a single capture, or parenthesized subexpression.
+ The portion of the system user name that matched the capture can then
+ be referenced in the <replaceable>database-username</replaceable>
field as <literal>\1</literal> (backslash-one). This allows the mapping of
multiple user names in a single line, which is particularly useful for
simple syntax substitutions. For example, these entries
@@ -1022,12 +1023,11 @@ mymap /^(.*)@otherdomain\.com$ guest
<para>
If the <replaceable>database-username</replaceable> field starts with
a slash (<literal>/</literal>), the remainder of the field is treated
- as a regular expression (see <xref linkend="posix-syntax-details"/>
- for details of <productname>PostgreSQL</productname>'s regular
- expression syntax). It is not possible to use <literal>\1</literal>
- to use a capture from regular expression on
- <replaceable>system-username</replaceable> for a regular expression
- on <replaceable>database-username</replaceable>.
+ as a regular expression.
+ When the <replaceable>database-username</replaceable> field is a regular
+ expression, it is not possible to use <literal>\1</literal> within it to
+ refer to a capture from the <replaceable>system-username</replaceable>
+ field.
</para>
<tip>
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 59a0874528a..c7acc0f182f 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -4618,10 +4618,12 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
</term>
<listitem>
<para>
- Invalidate replication slots that have remained idle longer than this
- duration. If this value is specified without units, it is taken as
- minutes. A value of zero (the default) disables the idle timeout
- invalidation mechanism. This parameter can only be set in the
+ Invalidate replication slots that have remained inactive (not used by
+ a <link linkend="protocol-replication">replication connection</link>)
+ for longer than this duration.
+ If this value is specified without units, it is taken as seconds.
+ A value of zero (the default) disables the idle timeout
+ invalidation mechanism. This parameter can only be set in the
<filename>postgresql.conf</filename> file or on the server command
line.
</para>
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index c28aa71f570..f5a0e0954a1 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -11247,10 +11247,10 @@ now()
statement (more specifically, the time of receipt of the latest command
message from the client).
<function>statement_timestamp()</function> and <function>transaction_timestamp()</function>
- return the same value during the first command of a transaction, but might
- differ during subsequent commands.
+ return the same value during the first statement of a transaction, but might
+ differ during subsequent statements.
<function>clock_timestamp()</function> returns the actual current time, and
- therefore its value changes even within a single SQL command.
+ therefore its value changes even within a single SQL statement.
<function>timeofday()</function> is a historical
<productname>PostgreSQL</productname> function. Like
<function>clock_timestamp()</function>, it returns the actual current time,
@@ -28973,7 +28973,7 @@ LOG: Grand total: 1651920 bytes in 201 blocks; 622360 free (88 chunks); 1029560
will be stored.)
If the optional second parameter is given as <literal>true</literal>,
it specifies executing <function>pg_backup_start</function> as quickly
- as possible. This forces an immediate checkpoint which will cause a
+ as possible. This forces a fast checkpoint which will cause a
spike in I/O operations, slowing any concurrently executing queries.
</para>
<para>
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index b2c2cf9eac8..5bf59a19855 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -2320,6 +2320,19 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
</listitem>
</varlistentry>
+ <varlistentry id="libpq-connect-servicefile" xreflabel="servicefile">
+ <term><literal>servicefile</literal></term>
+ <listitem>
+ <para>
+ This option specifies the name of the per-user connection service file
+ (see <xref linkend="libpq-pgservice"/>).
+ Defaults to <filename>~/.pg_service.conf</filename>, or
+ <filename>%APPDATA%\postgresql\.pg_service.conf</filename> on
+ Microsoft Windows.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="libpq-connect-target-session-attrs" xreflabel="target_session_attrs">
<term><literal>target_session_attrs</literal></term>
<listitem>
@@ -9140,12 +9153,8 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough)
<indexterm>
<primary><envar>PGSERVICEFILE</envar></primary>
</indexterm>
- <envar>PGSERVICEFILE</envar> specifies the name of the per-user
- connection service file
- (see <xref linkend="libpq-pgservice"/>).
- Defaults to <filename>~/.pg_service.conf</filename>, or
- <filename>%APPDATA%\postgresql\.pg_service.conf</filename> on
- Microsoft Windows.
+ <envar>PGSERVICEFILE</envar> behaves the same as the
+ <xref linkend="libpq-connect-servicefile"/> connection parameter.
</para>
</listitem>
@@ -9576,7 +9585,8 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough)
On Microsoft Windows, it is named
<filename>%APPDATA%\postgresql\.pg_service.conf</filename> (where
<filename>%APPDATA%</filename> refers to the Application Data subdirectory
- in the user's profile). A different file name can be specified by
+ in the user's profile). A different file name can be specified using the
+ <literal>servicefile</literal> key word in a libpq connection string or by
setting the environment variable <envar>PGSERVICEFILE</envar>.
The system-wide file is named <filename>pg_service.conf</filename>.
By default it is sought in the <filename>etc</filename> directory
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 4265a22d4de..823afe1b30b 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -3980,6 +3980,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
</para>
<para>
Estimated number of rows inserted since this table was last vacuumed
+ (not counting <command>VACUUM FULL</command>)
</para></entry>
</row>
@@ -4066,7 +4067,8 @@ description | Waiting for a newly initialized WAL file to reach durable storage
<structfield>total_vacuum_time</structfield> <type>double precision</type>
</para>
<para>
- Total time this table has been manually vacuumed, in milliseconds.
+ Total time this table has been manually vacuumed, in milliseconds
+ (not counting <command>VACUUM FULL</command>).
(This includes the time spent sleeping due to cost-based delays.)
</para></entry>
</row>
diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index 82fe3f93761..e74b5be1eff 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -886,6 +886,16 @@ SELCT 1/0;<!-- this typo is intentional -->
Errors detected at semantic analysis or later, such as a misspelled
table or column name, do not have this effect.
</para>
+
+ <para>
+ Lastly, note that all the statements within the Query message will
+ observe the same value of <function>statement_timestamp()</function>,
+ since that timestamp is updated only upon receipt of the Query
+ message. This will result in them all observing the same
+ value of <function>transaction_timestamp()</function> as well,
+ except in cases where the query string ends a previously-started
+ transaction and begins a new one.
+ </para>
</sect3>
</sect2>
@@ -3482,6 +3492,7 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
<para>
Boolean option to use binary transfer mode. Binary mode is faster
than the text mode but slightly less robust.
+ The default is <literal>off</literal>.
</para>
</listitem>
</varlistentry>
@@ -3494,6 +3505,7 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
<para>
Boolean option to enable sending the messages that are written
by <function>pg_logical_emit_message</function>.
+ The default is <literal>off</literal>.
</para>
</listitem>
</varlistentry>
@@ -3504,11 +3516,13 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
</term>
<listitem>
<para>
- Boolean option to enable streaming of in-progress transactions.
- It accepts an additional value "parallel" to enable sending extra
- information with some messages to be used for parallelisation.
- Minimum protocol version 2 is required to turn it on. Minimum protocol
- version 4 is required for the "parallel" option.
+ Option to enable streaming of in-progress transactions. Valid values are
+ <literal>off</literal> (the default), <literal>on</literal> and
+ <literal>parallel</literal>. The setting <literal>parallel</literal>
+ enables sending extra information with some messages to be used for
+ parallelization. Minimum protocol version 2 is required to turn it
+ <literal>on</literal>. Minimum protocol version 4 is required for the
+ <literal>parallel</literal> value.
</para>
</listitem>
</varlistentry>
@@ -3521,6 +3535,7 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
<para>
Boolean option to enable two-phase transactions. Minimum protocol
version 3 is required to turn it on.
+ The default is <literal>off</literal>.
</para>
</listitem>
</varlistentry>
@@ -3537,6 +3552,7 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
to send the changes regardless of their origin. This can be used
to avoid loops (infinite replication of the same data) among
replication nodes.
+ The default is <literal>any</literal>.
</para>
</listitem>
</varlistentry>
@@ -6081,13 +6097,14 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
</varlistentry>
<varlistentry>
- <term>Int32(196608)</term>
+ <term>Int32</term>
<listitem>
<para>
The protocol version number. The most significant 16 bits are
- the major version number (3 for the protocol described here).
- The least significant 16 bits are the minor version number
- (0 for the protocol described here).
+ the major version number. The least significant 16 bits are the minor
+ version number. As an example protocol version 3.2 is represented as
+ <literal>196610</literal> in decimal or more clearly as
+ <literal>0x00030002</literal> in hexadecimal.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/query.sgml b/doc/src/sgml/query.sgml
index 727a0cb185f..b190f28d41e 100644
--- a/doc/src/sgml/query.sgml
+++ b/doc/src/sgml/query.sgml
@@ -264,8 +264,18 @@ COPY weather FROM '/home/user/weather.txt';
where the file name for the source file must be available on the
machine running the backend process, not the client, since the backend process
- reads the file directly. You can read more about the
- <command>COPY</command> command in <xref linkend="sql-copy"/>.
+ reads the file directly. The data inserted above into the weather table
+ could also be inserted from a file containing (values are separated by a
+ tab character):
+
+<programlisting>
+San Francisco 46 50 0.25 1994-11-27
+San Francisco 43 57 0.0 1994-11-29
+Hayward 37 54 \N 1994-11-29
+</programlisting>
+
+ You can read more about the <command>COPY</command> command in
+ <xref linkend="sql-copy"/>.
</para>
</sect1>
diff --git a/doc/src/sgml/ref/checkpoint.sgml b/doc/src/sgml/ref/checkpoint.sgml
index db011a47d04..cd981cf2cab 100644
--- a/doc/src/sgml/ref/checkpoint.sgml
+++ b/doc/src/sgml/ref/checkpoint.sgml
@@ -21,7 +21,12 @@ PostgreSQL documentation
<refsynopsisdiv>
<synopsis>
-CHECKPOINT
+CHECKPOINT [ ( option [, ...] ) ]
+
+<phrase>where <replaceable class="parameter">option</replaceable> can be one of:</phrase>
+
+ FLUSH_UNLOGGED [ <replaceable class="parameter">boolean</replaceable> ]
+ MODE { FAST | SPREAD }
</synopsis>
</refsynopsisdiv>
@@ -37,15 +42,25 @@ CHECKPOINT
</para>
<para>
- The <command>CHECKPOINT</command> command forces an immediate
+ By default, the <command>CHECKPOINT</command> command forces a fast
checkpoint when the command is issued, without waiting for a
regular checkpoint scheduled by the system (controlled by the settings in
<xref linkend="runtime-config-wal-checkpoints"/>).
+ To request the checkpoint be spread over a longer interval, set the
+ <literal>MODE</literal> option to <literal>SPREAD</literal>.
<command>CHECKPOINT</command> is not intended for use during normal
operation.
</para>
<para>
+ The server may consolidate concurrently requested checkpoints. Such
+ consolidated requests will contain a combined set of options. For example,
+ if one session requests a fast checkpoint and another requests a spread
+ checkpoint, the server may combine those requests and perform one fast
+ checkpoint.
+ </para>
+
+ <para>
If executed during recovery, the <command>CHECKPOINT</command> command
will force a restartpoint (see <xref linkend="wal-configuration"/>)
rather than writing a new checkpoint.
@@ -59,6 +74,55 @@ CHECKPOINT
</refsect1>
<refsect1>
+ <title>Parameters</title>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>FLUSH_UNLOGGED</literal></term>
+ <listitem>
+ <para>
+ Normally, <command>CHECKPOINT</command> does not flush dirty buffers of
+ unlogged relations. This option, which is disabled by default, enables
+ flushing unlogged relations to disk.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>MODE</literal></term>
+ <listitem>
+ <para>
+ When set to <literal>FAST</literal>, which is the default, the requested
+ checkpoint will be completed as fast as possible, which may result in a
+ significantly higher rate of I/O during the checkpoint.
+ </para>
+ <para>
+ <literal>MODE</literal> can also be set to <literal>SPREAD</literal> to
+ request the checkpoint be spread over a longer interval (controlled via
+ the settings in <xref linkend="runtime-config-wal-checkpoints"/>), like a
+ regular checkpoint scheduled by the system. This can reduce the rate of
+ I/O during the checkpoint.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><replaceable class="parameter">boolean</replaceable></term>
+ <listitem>
+ <para>
+ Specifies whether the selected option should be turned on or off.
+ You can write <literal>TRUE</literal>, <literal>ON</literal>, or
+ <literal>1</literal> to enable the option, and <literal>FALSE</literal>,
+ <literal>OFF</literal>, or <literal>0</literal> to disable it. The
+ <replaceable class="parameter">boolean</replaceable> value can also
+ be omitted, in which case <literal>TRUE</literal> is assumed.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1>
<title>Compatibility</title>
<para>
diff --git a/doc/src/sgml/ref/create_database.sgml b/doc/src/sgml/ref/create_database.sgml
index 4da8aeebb50..3544b15efda 100644
--- a/doc/src/sgml/ref/create_database.sgml
+++ b/doc/src/sgml/ref/create_database.sgml
@@ -150,12 +150,12 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable>
<para>
Sets the default collation order and character classification in the
new database. Collation affects the sort order applied to strings,
- e.g., in queries with <literal>ORDER BY</literal>, as well as the order used in indexes
- on text columns. Character classification affects the categorization
- of characters, e.g., lower, upper, and digit. Also sets the
- associated aspects of the operating system environment,
- <literal>LC_COLLATE</literal> and <literal>LC_CTYPE</literal>. The
- default is the same setting as the template database. See <xref
+ e.g., in queries with <literal>ORDER BY</literal>, as well as the
+ order used in indexes on text columns. Character classification
+ affects the categorization of characters, e.g., lower, upper, and
+ digit. Also sets the <literal>LC_CTYPE</literal> aspect of the
+ operating system environment. The default is the same setting as the
+ template database. See <xref
linkend="collation-managing-create-libc"/> and <xref
linkend="collation-managing-create-icu"/> for details.
</para>
@@ -189,17 +189,16 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable>
<term><replaceable class="parameter">lc_collate</replaceable></term>
<listitem>
<para>
- Sets <literal>LC_COLLATE</literal> in the database server's operating
- system environment. The default is the setting of <xref
- linkend="create-database-locale"/> if specified, otherwise the same
- setting as the template database. See below for additional
- restrictions.
+ If <xref linkend="create-database-locale-provider"/> is
+ <literal>libc</literal>, sets the default collation order to use in
+ the new database, overriding the setting <xref
+ linkend="create-database-locale"/>. Otherwise, this setting is
+ ignored.
</para>
<para>
- If <xref linkend="create-database-locale-provider"/> is
- <literal>libc</literal>, also sets the default collation order to use
- in the new database, overriding the setting <xref
- linkend="create-database-locale"/>.
+ The default is the setting of <xref linkend="create-database-locale"/>
+ if specified, otherwise the same setting as the template database.
+ See below for additional restrictions.
</para>
</listitem>
</varlistentry>
@@ -208,16 +207,18 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable>
<listitem>
<para>
Sets <literal>LC_CTYPE</literal> in the database server's operating
- system environment. The default is the setting of <xref
- linkend="create-database-locale"/> if specified, otherwise the same
- setting as the template database. See below for additional
- restrictions.
+ system environment.
</para>
<para>
If <xref linkend="create-database-locale-provider"/> is
- <literal>libc</literal>, also sets the default character
- classification to use in the new database, overriding the setting
- <xref linkend="create-database-locale"/>.
+ <literal>libc</literal>, sets the default character classification to
+ use in the new database, overriding the setting <xref
+ linkend="create-database-locale"/>.
+ </para>
+ <para>
+ The default is the setting of <xref linkend="create-database-locale"/>
+ if specified, otherwise the same setting as the template database.
+ See below for additional restrictions.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/createdb.sgml b/doc/src/sgml/ref/createdb.sgml
index 5c4e0465ed9..2ccbe13f390 100644
--- a/doc/src/sgml/ref/createdb.sgml
+++ b/doc/src/sgml/ref/createdb.sgml
@@ -136,7 +136,8 @@ PostgreSQL documentation
<term><option>--lc-collate=<replaceable class="parameter">locale</replaceable></option></term>
<listitem>
<para>
- Specifies the LC_COLLATE setting to be used in this database.
+ Specifies the LC_COLLATE setting to be used in this database (ignored
+ unless the locale provider is <literal>libc</literal>).
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgml
index 9659f76042c..fecee08b0a5 100644
--- a/doc/src/sgml/ref/pg_basebackup.sgml
+++ b/doc/src/sgml/ref/pg_basebackup.sgml
@@ -500,8 +500,9 @@ PostgreSQL documentation
<term><option>--checkpoint={fast|spread}</option></term>
<listitem>
<para>
- Sets checkpoint mode to fast (immediate) or spread (the default)
+ Sets checkpoint mode to fast or spread
(see <xref linkend="backup-lowlevel-base-backup"/>).
+ The default is spread.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/pgtesttiming.sgml b/doc/src/sgml/ref/pgtesttiming.sgml
index 1fcdbf7f06e..afe6a12be4b 100644
--- a/doc/src/sgml/ref/pgtesttiming.sgml
+++ b/doc/src/sgml/ref/pgtesttiming.sgml
@@ -161,7 +161,7 @@ PostgreSQL documentation
<para>
<screen><![CDATA[
Testing timing overhead for 3 seconds.
-Per loop time including overhead: 16.40 ns
+Average loop time including overhead: 16.40 ns
Histogram of timing durations:
<= ns % of total running % count
0 0.0000 0.0000 0
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 95f4cac2467..4f7b11175c6 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -4623,6 +4623,15 @@ bar
</listitem>
</varlistentry>
+ <varlistentry id="app-psql-variables-servicefile">
+ <term><varname>SERVICEFILE</varname></term>
+ <listitem>
+ <para>
+ The service file name, if applicable.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="app-psql-variables-shell-error">
<term><varname>SHELL_ERROR</varname></term>
<listitem>
diff --git a/doc/src/sgml/system-views.sgml b/doc/src/sgml/system-views.sgml
index e1ac544ee40..4187191ea74 100644
--- a/doc/src/sgml/system-views.sgml
+++ b/doc/src/sgml/system-views.sgml
@@ -82,6 +82,11 @@
</row>
<row>
+ <entry><link linkend="view-pg-dsm-registry-allocations"><structname>pg_dsm_registry_allocations</structname></link></entry>
+ <entry>shared memory allocations tracked in the DSM registry</entry>
+ </row>
+
+ <row>
<entry><link linkend="view-pg-file-settings"><structname>pg_file_settings</structname></link></entry>
<entry>summary of configuration file contents</entry>
</row>
@@ -1086,6 +1091,75 @@ AND c1.path[c2.level] = c2.path[c2.level];
</sect1>
+ <sect1 id="view-pg-dsm-registry-allocations">
+ <title><structname>pg_dsm_registry_allocations</structname></title>
+
+ <indexterm zone="view-pg-dsm-registry-allocations">
+ <primary>pg_dsm_registry_allocations</primary>
+ </indexterm>
+
+ <para>
+ The <structname>pg_dsm_registry_allocations</structname> view shows shared
+ memory allocations tracked in the dynamic shared memory (DSM) registry.
+ This includes memory allocated by extensions using the mechanisms detailed
+ in <xref linkend="xfunc-shared-addin-after-startup" />.
+ </para>
+
+ <table>
+ <title><structname>pg_dsm_registry_allocations</structname> Columns</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry role="catalog_table_entry"><para role="column_definition">
+ Column Type
+ </para>
+ <para>
+ Description
+ </para></entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry role="catalog_table_entry"><para role="column_definition">
+ <structfield>name</structfield> <type>text</type>
+ </para>
+ <para>
+ The name of the allocation in the DSM registry.
+ </para></entry>
+ </row>
+
+ <row>
+ <entry role="catalog_table_entry"><para role="column_definition">
+ <structfield>type</structfield> <type>text</type>
+ </para>
+ <para>
+ The type of allocation. Possible values are <literal>segment</literal>,
+ <literal>area</literal>, and <literal>hash</literal>, which correspond
+ to dynamic shared memory segments, areas, and hash tables, respectively.
+ </para></entry>
+ </row>
+
+ <row>
+ <entry role="catalog_table_entry"><para role="column_definition">
+ <structfield>size</structfield> <type>int8</type>
+ </para>
+ <para>
+ Size of the allocation in bytes. NULL for entries of type
+ <literal>area</literal> and <literal>hash</literal>.
+ </para></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>
+ By default, the <structname>pg_dsm_registry_allocations</structname> view
+ can be read only by superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role.
+ </para>
+ </sect1>
+
<sect1 id="view-pg-file-settings">
<title><structname>pg_file_settings</structname></title>
@@ -2929,7 +3003,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
<listitem>
<para>
<literal>idle_timeout</literal> means that the slot has remained
- idle longer than the configured
+ inactive longer than the configured
<xref linkend="guc-idle-replication-slot-timeout"/> duration.
</para>
</listitem>