Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit312061c

Browse files
committed
revert: add transaction processing chapter with internals info
This doc patch (master hash66bc9d2) was decided to be toosignificant for backpatching, so reverted in all but master. Also fixSGML file header comment in master.Reported-by: Peter EisentrautDiscussion:https://postgr.es/m/c6304b19-6ff7-f3af-0148-cf7aa7e2fbfd@enterprisedb.comBackpatch-through: 11
1 parentae99390 commit312061c

14 files changed

+44
-292
lines changed

‎doc/src/sgml/catalogs.sgml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10321,8 +10321,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
1032110321
</para>
1032210322
<para>
1032310323
Virtual ID of the transaction targeted by the lock,
10324-
or null if the target is not a virtual transaction ID; see
10325-
<xref linkend="transactions"/>
10324+
or null if the target is not a virtual transaction ID
1032610325
</para></entry>
1032710326
</row>
1032810327

@@ -10331,8 +10330,8 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
1033110330
<structfield>transactionid</structfield> <type>xid</type>
1033210331
</para>
1033310332
<para>
10334-
ID of the transaction targeted by the lock, or null if the target
10335-
is not a transaction ID; <xref linkend="transactions"/>
10333+
ID of the transaction targeted by the lock,
10334+
or null if the targetis not a transaction ID
1033610335
</para></entry>
1033710336
</row>
1033810337

‎doc/src/sgml/config.sgml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6834,14 +6834,12 @@ local0.* /var/log/postgresql
68346834
</row>
68356835
<row>
68366836
<entry><literal>%v</literal></entry>
6837-
<entry>Virtual transaction ID (backendID/localXID); see
6838-
<xref linkend="transaction-id"/></entry>
6837+
<entry>Virtual transaction ID (backendID/localXID)</entry>
68396838
<entry>no</entry>
68406839
</row>
68416840
<row>
68426841
<entry><literal>%x</literal></entry>
6843-
<entry>Transaction ID (0 if none is assigned); see
6844-
<xref linkend="transaction-id"/></entry>
6842+
<entry>Transaction ID (0 if none is assigned)</entry>
68456843
<entry>no</entry>
68466844
</row>
68476845
<row>

‎doc/src/sgml/datatype.sgml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4811,8 +4811,7 @@ SELECT * FROM pg_attribute
48114811
<structfield>xmin</structfield> and <structfield>xmax</structfield>. Transaction identifiers are 32-bit quantities.
48124812
In some contexts, a 64-bit variant <type>xid8</type> is used. Unlike
48134813
<type>xid</type> values, <type>xid8</type> values increase strictly
4814-
monotonically and cannot be reused in the lifetime of a database
4815-
cluster. See <xref linkend="transaction-id"/> for more details.
4814+
monotonically and cannot be reused in the lifetime of a database cluster.
48164815
</para>
48174816

48184817
<para>

‎doc/src/sgml/filelist.sgml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@
101101
<!ENTITY protocol SYSTEM "protocol.sgml">
102102
<!ENTITY sources SYSTEM "sources.sgml">
103103
<!ENTITY storage SYSTEM "storage.sgml">
104-
<!ENTITY transaction SYSTEM "xact.sgml">
105104
<!ENTITY tablesample-method SYSTEM "tablesample-method.sgml">
106105
<!ENTITY generic-wal SYSTEM "generic-wal.sgml">
107106
<!ENTITY backup-manifest SYSTEM "backup-manifest.sgml">

‎doc/src/sgml/func.sgml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23223,10 +23223,7 @@ SELECT collation for ('foo' COLLATE "de_DE");
2322323223
<para>
2322423224
Returns the current transaction's ID. It will assign a new one if the
2322523225
current transaction does not have one already (because it has not
23226-
performed any database updates); see <xref
23227-
linkend="transaction-id"/> for details. If executed in a
23228-
subtransaction, this will return the top-level transaction ID;
23229-
see <xref linkend="subxacts"/> for details.
23226+
performed any database updates).
2323023227
</para></entry>
2323123228
</row>
2323223229

@@ -23243,8 +23240,6 @@ SELECT collation for ('foo' COLLATE "de_DE");
2324323240
ID is assigned yet. (It's best to use this variant if the transaction
2324423241
might otherwise be read-only, to avoid unnecessary consumption of an
2324523242
XID.)
23246-
If executed in a subtransaction, this will return the top-level
23247-
transaction ID.
2324823243
</para></entry>
2324923244
</row>
2325023245

@@ -23288,9 +23283,6 @@ SELECT collation for ('foo' COLLATE "de_DE");
2328823283
<para>
2328923284
Returns a current <firstterm>snapshot</firstterm>, a data structure
2329023285
showing which transaction IDs are now in-progress.
23291-
Only top-level transaction IDs are included in the snapshot;
23292-
subtransaction IDs are not shown; see <xref linkend="subxacts"/>
23293-
for details.
2329423286
</para></entry>
2329523287
</row>
2329623288

@@ -23345,8 +23337,7 @@ SELECT collation for ('foo' COLLATE "de_DE");
2334523337
Is the given transaction ID <firstterm>visible</firstterm> according
2334623338
to this snapshot (that is, was it completed before the snapshot was
2334723339
taken)? Note that this function will not give the correct answer for
23348-
a subtransaction ID (subxid); see <xref linkend="subxacts"/> for
23349-
details.
23340+
a subtransaction ID.
2335023341
</para></entry>
2335123342
</row>
2335223343
</tbody>
@@ -23358,9 +23349,8 @@ SELECT collation for ('foo' COLLATE "de_DE");
2335823349
wraps around every 4 billion transactions. However,
2335923350
the functions shown in <xref linkend="functions-pg-snapshot"/> use a
2336023351
64-bit type <type>xid8</type> that does not wrap around during the life
23361-
of an installation and can be converted to <type>xid</type> by casting if
23362-
required; see <xref linkend="transaction-id"/> for details.
23363-
The data type <type>pg_snapshot</type> stores information about
23352+
of an installation, and can be converted to <type>xid</type> by casting if
23353+
required. The data type <type>pg_snapshot</type> stores information about
2336423354
transaction ID visibility at a particular moment in time. Its components
2336523355
are described in <xref linkend="functions-pg-snapshot-parts"/>.
2336623356
<type>pg_snapshot</type>'s textual representation is
@@ -23406,7 +23396,7 @@ SELECT collation for ('foo' COLLATE "de_DE");
2340623396
xmax</literal> and not in this list was already completed at the time
2340723397
of the snapshot, and thus is either visible or dead according to its
2340823398
commit status. This list does not include the transaction IDs of
23409-
subtransactions (subxids).
23399+
subtransactions.
2341023400
</entry>
2341123401
</row>
2341223402
</tbody>

‎doc/src/sgml/glossary.sgml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,8 +1631,7 @@
16311631
<literal>3</literal> (values under that are reserved) and the
16321632
epoch value is incremented by one.
16331633
In some contexts, the epoch and xid values are
1634-
considered together as a single 64-bit value; see <xref
1635-
linkend="transaction-id"/> for more details.
1634+
considered together as a single 64-bit value.
16361635
</para>
16371636
<para>
16381637
For more information, see

‎doc/src/sgml/monitoring.sgml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -869,8 +869,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
869869
<structfield>backend_xid</structfield> <type>xid</type>
870870
</para>
871871
<para>
872-
Top-level transaction identifier of this backend, if any; see
873-
<xref linkend="transaction-id"/>.
872+
Top-level transaction identifier of this backend, if any.
874873
</para></entry>
875874
</row>
876875

@@ -1775,8 +1774,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
17751774
</row>
17761775
<row>
17771776
<entry><literal>virtualxid</literal></entry>
1778-
<entry>Waiting to acquire a virtual transaction ID lock; see
1779-
<xref linkend="transaction-id"/>.</entry>
1777+
<entry>Waiting to acquire a virtual transaction ID lock.</entry>
17801778
</row>
17811779
</tbody>
17821780
</tgroup>

‎doc/src/sgml/pgrowlocks.sgml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ pgrowlocks(text) returns setof record
5757
<row>
5858
<entry><structfield>locker</structfield></entry>
5959
<entry><type>xid</type></entry>
60-
<entry>Transaction ID of locker, or multixact ID if
61-
multitransaction; see <xref linkend="transaction-id"/></entry>
60+
<entry>Transaction ID of locker, or multixact ID if multitransaction</entry>
6261
</row>
6362
<row>
6463
<entry><structfield>multi</structfield></entry>

‎doc/src/sgml/postgres.sgml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ break is not needed in a wider output rendering.
267267
&brin;
268268
&hash;
269269
&storage;
270-
&transaction;
271270
&bki;
272271
&planstats;
273272
&backup-manifest;

‎doc/src/sgml/ref/release_savepoint.sgml

Lines changed: 21 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ PostgreSQL documentation
2121

2222
<refnamediv>
2323
<refname>RELEASE SAVEPOINT</refname>
24-
<refpurpose>release a previously defined savepoint</refpurpose>
24+
<refpurpose>destroy a previously defined savepoint</refpurpose>
2525
</refnamediv>
2626

2727
<refsynopsisdiv>
@@ -34,13 +34,23 @@ RELEASE [ SAVEPOINT ] <replaceable>savepoint_name</replaceable>
3434
<title>Description</title>
3535

3636
<para>
37-
<command>RELEASE SAVEPOINT</command> releases the named savepoint and
38-
all active savepoints that were created after the named savepoint,
39-
and frees their resources. All changes made since the creation of
40-
the savepoint that didn't already get rolled back are merged into
41-
the transaction or savepoint that was active when the named savepoint
42-
was created. Changes made after <command>RELEASE SAVEPOINT</command>
43-
will also be part of this active transaction or savepoint.
37+
<command>RELEASE SAVEPOINT</command> destroys a savepoint previously defined
38+
in the current transaction.
39+
</para>
40+
41+
<para>
42+
Destroying a savepoint makes it unavailable as a rollback point,
43+
but it has no other user visible behavior. It does not undo the
44+
effects of commands executed after the savepoint was established.
45+
(To do that, see <xref linkend="sql-rollback-to"/>.)
46+
Destroying a savepoint when
47+
it is no longer needed allows the system to reclaim some resources
48+
earlier than transaction end.
49+
</para>
50+
51+
<para>
52+
<command>RELEASE SAVEPOINT</command> also destroys all savepoints that were
53+
established after the named savepoint was established.
4454
</para>
4555
</refsect1>
4656

@@ -52,7 +62,7 @@ RELEASE [ SAVEPOINT ] <replaceable>savepoint_name</replaceable>
5262
<term><replaceable>savepoint_name</replaceable></term>
5363
<listitem>
5464
<para>
55-
The name of the savepoint torelease.
65+
The name of the savepoint todestroy.
5666
</para>
5767
</listitem>
5868
</varlistentry>
@@ -68,7 +78,7 @@ RELEASE [ SAVEPOINT ] <replaceable>savepoint_name</replaceable>
6878

6979
<para>
7080
It is not possible to release a savepoint when the transaction is in
71-
an aborted state; to do that, use <xref linkend="sql-rollback-to"/>.
81+
an aborted state.
7282
</para>
7383

7484
<para>
@@ -83,7 +93,7 @@ RELEASE [ SAVEPOINT ] <replaceable>savepoint_name</replaceable>
8393
<title>Examples</title>
8494

8595
<para>
86-
To establish and laterrelease a savepoint:
96+
To establish and laterdestroy a savepoint:
8797
<programlisting>
8898
BEGIN;
8999
INSERT INTO table1 VALUES (3);
@@ -94,36 +104,6 @@ COMMIT;
94104
</programlisting>
95105
The above transaction will insert both 3 and 4.
96106
</para>
97-
98-
<para>
99-
A more complex example with multiple nested subtransactions:
100-
<programlisting>
101-
BEGIN;
102-
INSERT INTO table1 VALUES (1);
103-
SAVEPOINT sp1;
104-
INSERT INTO table1 VALUES (2);
105-
SAVEPOINT sp2;
106-
INSERT INTO table1 VALUES (3);
107-
RELEASE SAVEPOINT sp2;
108-
INSERT INTO table1 VALUES (4))); -- generates an error
109-
</programlisting>
110-
In this example, the application requests the release of the savepoint
111-
<literal>sp2</literal>, which inserted 3. This changes the insert's
112-
transaction context to <literal>sp1</literal>. When the statement
113-
attempting to insert value 4 generates an error, the insertion of 2 and
114-
4 are lost because they are in the same, now-rolled back savepoint,
115-
and value 3 is in the same transaction context. The application can
116-
now only choose one of these two commands, since all other commands
117-
will be ignored:
118-
<programlisting>
119-
ROLLBACK;
120-
ROLLBACK TO SAVEPOINT sp1;
121-
</programlisting>
122-
Choosing <command>ROLLBACK</command> will abort everything, including
123-
value 1, whereas <command>ROLLBACK TO SAVEPOINT sp1</command> will retain
124-
value 1 and allow the transaction to continue.
125-
</para>
126-
127107
</refsect1>
128108

129109
<refsect1>

‎doc/src/sgml/ref/rollback.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ ROLLBACK [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
5656
<term><literal>AND CHAIN</literal></term>
5757
<listitem>
5858
<para>
59-
If <literal>AND CHAIN</literal> is specified, a new(not aborted)
60-
transaction isimmediately started with the same transaction
61-
characteristics (see <xreflinkend="sql-set-transaction"/>) as the
62-
just finished one. Otherwise,no new transaction is started.
59+
If <literal>AND CHAIN</literal> is specified, a newtransaction is
60+
immediately started with the same transaction characteristics (see <xref
61+
linkend="sql-set-transaction"/>) as the just finished one. Otherwise,
62+
no new transaction is started.
6363
</para>
6464
</listitem>
6565
</varlistentry>

‎doc/src/sgml/ref/rollback_to.sgml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ ROLLBACK [ WORK | TRANSACTION ] TO [ SAVEPOINT ] <replaceable>savepoint_name</re
3535

3636
<para>
3737
Roll back all commands that were executed after the savepoint was
38-
established and then start a new subtransaction at the same transaction level.
39-
The savepoint remains valid and can be rolled back to again later,
40-
if needed.
38+
established. The savepoint remains valid and can be rolled back to
39+
again later, if needed.
4140
</para>
4241

4342
<para>

‎doc/src/sgml/wal.sgml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
<title>Reliability and the Write-Ahead Log</title>
55

66
<para>
7-
This chapter explains how to control the reliability of
8-
<productname>PostgreSQL</productname>, including details about the
9-
Write-Ahead Log.
7+
This chapter explains how the Write-Ahead Log is used to obtain
8+
efficient, reliable operation.
109
</para>
1110

1211
<sect1 id="wal-reliability">
@@ -813,5 +812,4 @@
813812
seem to be a problem in practice.
814813
</para>
815814
</sect1>
816-
817815
</chapter>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp