Skip to content

Commit 4466b38

Browse files
committed
Doc: document the current-transaction-modes GUCs.
We had documentation of default_transaction_isolation et al, but for some reason not of transaction_isolation et al. AFAICS this is just an ancient oversight, so repair. Per bug #17077 from Yanliang Lei. Discussion: https://postgr.es/m/17077-ade8e166a01e1374@postgresql.org
1 parent 3c5b7c6 commit 4466b38

File tree

2 files changed

+75
-2
lines changed

2 files changed

+75
-2
lines changed

doc/src/sgml/config.sgml

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8430,6 +8430,68 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
84308430
</listitem>
84318431
</varlistentry>
84328432

8433+
<varlistentry id="guc-transaction-isolation" xreflabel="transaction_isolation">
8434+
<term><varname>transaction_isolation</varname> (<type>enum</type>)
8435+
<indexterm>
8436+
<primary>transaction isolation level</primary>
8437+
</indexterm>
8438+
<indexterm>
8439+
<primary><varname>transaction_isolation</varname> configuration parameter</primary>
8440+
</indexterm>
8441+
</term>
8442+
<listitem>
8443+
<para>
8444+
This parameter reflects the current transaction's isolation level.
8445+
At the beginning of each transaction, it is set to the current value
8446+
of <xref linkend="guc-default-transaction-isolation"/>.
8447+
Any subsequent attempt to change it is equivalent to a <xref
8448+
linkend="sql-set-transaction"/> command.
8449+
</para>
8450+
</listitem>
8451+
</varlistentry>
8452+
8453+
<varlistentry id="guc-transaction-read-only" xreflabel="transaction_read_only">
8454+
<term><varname>transaction_read_only</varname> (<type>boolean</type>)
8455+
<indexterm>
8456+
<primary>read-only transaction</primary>
8457+
<secondary>setting default</secondary>
8458+
</indexterm>
8459+
<indexterm>
8460+
<primary><varname>transaction_read_only</varname> configuration parameter</primary>
8461+
</indexterm>
8462+
</term>
8463+
<listitem>
8464+
<para>
8465+
This parameter reflects the current transaction's read-only status.
8466+
At the beginning of each transaction, it is set to the current value
8467+
of <xref linkend="guc-default-transaction-read-only"/>.
8468+
Any subsequent attempt to change it is equivalent to a <xref
8469+
linkend="sql-set-transaction"/> command.
8470+
</para>
8471+
</listitem>
8472+
</varlistentry>
8473+
8474+
<varlistentry id="guc-transaction-deferrable" xreflabel="transaction_deferrable">
8475+
<term><varname>transaction_deferrable</varname> (<type>boolean</type>)
8476+
<indexterm>
8477+
<primary>deferrable transaction</primary>
8478+
<secondary>setting default</secondary>
8479+
</indexterm>
8480+
<indexterm>
8481+
<primary><varname>transaction_deferrable</varname> configuration parameter</primary>
8482+
</indexterm>
8483+
</term>
8484+
<listitem>
8485+
<para>
8486+
This parameter reflects the current transaction's deferrability status.
8487+
At the beginning of each transaction, it is set to the current value
8488+
of <xref linkend="guc-default-transaction-deferrable"/>.
8489+
Any subsequent attempt to change it is equivalent to a <xref
8490+
linkend="sql-set-transaction"/> command.
8491+
</para>
8492+
</listitem>
8493+
</varlistentry>
8494+
84338495

84348496
<varlistentry id="guc-session-replication-role" xreflabel="session_replication_role">
84358497
<term><varname>session_replication_role</varname> (<type>enum</type>)
@@ -10909,7 +10971,7 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
1090910971
<productname>PostgreSQL</productname> will automatically remove
1091010972
temporary files after a backend crash. If disabled, the files will be
1091110973
retained and may be used for debugging, for example. Repeated crashes
10912-
may however result in accumulation of useless files. This parameter
10974+
may however result in accumulation of useless files. This parameter
1091310975
can only be set in the <filename>postgresql.conf</filename> file or on
1091410976
the server command line.
1091510977
</para>

doc/src/sgml/ref/set_transaction.sgml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ SET SESSION CHARACTERISTICS AS TRANSACTION <replaceable class="parameter">transa
202202
</para>
203203

204204
<para>
205-
The session default transaction modes can also be set by setting the
205+
The session default transaction modes can also be set or examined via the
206206
configuration parameters <xref linkend="guc-default-transaction-isolation"/>,
207207
<xref linkend="guc-default-transaction-read-only"/>, and
208208
<xref linkend="guc-default-transaction-deferrable"/>.
@@ -212,6 +212,17 @@ SET SESSION CHARACTERISTICS AS TRANSACTION <replaceable class="parameter">transa
212212
<command>ALTER DATABASE</command>, etc. Consult <xref linkend="runtime-config"/>
213213
for more information.
214214
</para>
215+
216+
<para>
217+
The current transaction's modes can similarly be set or examined via the
218+
configuration parameters <xref linkend="guc-transaction-isolation"/>,
219+
<xref linkend="guc-transaction-read-only"/>, and
220+
<xref linkend="guc-transaction-deferrable"/>. Setting one of these
221+
parameters acts the same as the corresponding <command>SET
222+
TRANSACTION</command> option, with the same restrictions on when it can
223+
be done. However, these parameters cannot be set in the configuration
224+
file, or from any source other than live SQL.
225+
</para>
215226
</refsect1>
216227

217228
<refsect1>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy