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

Commit 9c27935

Browse files
committed
Updates to reflect availability of autocommit option.
1 parent 26993b2 commit 9c27935

File tree

2 files changed

+45
-25
lines changed

2 files changed

+45
-25
lines changed

doc/src/sgml/ref/begin.sgml

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/begin.sgml,v 1.18 2002/08/04 04:31:44 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/begin.sgml,v 1.19 2002/08/30 22:45:25 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -103,33 +103,35 @@ WARNING: BEGIN: already a transaction in progress
103103
<command>BEGIN</command> initiates a user transaction in chained mode,
104104
i.e., all user statements after <command>BEGIN</command> command will
105105
be executed in a single transaction until an explicit
106-
<xref linkend="sql-commit" endterm="sql-commit-title">,
107-
<xref linkend="sql-rollback" endterm="sql-rollback-title">,
108-
or execution abort. Statements in chained mode are executed much faster,
106+
<xref linkend="sql-commit" endterm="sql-commit-title"> or
107+
<xref linkend="sql-rollback" endterm="sql-rollback-title">.
108+
Statements are executed more quickly in chained mode,
109109
because transaction start/commit requires significant CPU and disk
110110
activity. Execution of multiple statements inside a transaction
111-
is also required for consistency when changing several
112-
related tables.
111+
is also useful to ensure consistency when changing several
112+
related tables: other clients will be unable to see the intermediate
113+
states wherein not all the related updates have been done.
113114
</para>
114115

115116
<para>
116117
The default transaction isolation level in
117118
<productname>PostgreSQL</productname>
118-
is READ COMMITTED, where queries inside the transaction see only changes
119-
committed before query execution. So, you have to use
119+
is READ COMMITTED, wherein each query inside the transaction sees changes
120+
committed before that query begins execution. So, you have to use
120121
<command>SET TRANSACTION ISOLATION LEVEL SERIALIZABLE</command>
121-
just after <command>BEGIN</command> if you need more rigorous transaction isolation.
122+
just after <command>BEGIN</command> if you need more rigorous transaction
123+
isolation. (Alternatively, you can change the default transaction
124+
isolation level; see the <citetitle>PostgreSQL Administrator's
125+
Guide</citetitle> for details.)
122126
In SERIALIZABLE mode queries will see only changes committed before
123127
the entire
124128
transaction began (actually, before execution of the first DML statement
125-
in a serializable transaction).
129+
in the transaction).
126130
</para>
127131

128132
<para>
129-
If the transaction is committed, <productname>PostgreSQL</productname>
130-
will ensure either that all updates are done or else that none of
131-
them are done. Transactions have the standard <acronym>ACID</acronym>
132-
(atomic, consistent, isolatable, and durable) property.
133+
Transactions have the standard <acronym>ACID</acronym>
134+
(atomic, consistent, isolatable, and durable) properties.
133135
</para>
134136

135137
<refsect2 id="R2-SQL-BEGIN-3">
@@ -140,9 +142,9 @@ WARNING: BEGIN: already a transaction in progress
140142
Notes
141143
</title>
142144
<para>
143-
Refer to <xref linkend="sql-lock" endterm="sql-lock-title">
144-
for further information
145-
about locking tables inside a transaction.
145+
<xref linkend="sql-start-transaction"
146+
endterm="sql-start-transaction-title"> has the same functionality
147+
as <command>BEGIN</>.
146148
</para>
147149

148150
<para>
@@ -151,6 +153,17 @@ WARNING: BEGIN: already a transaction in progress
151153
<xref linkend="SQL-ROLLBACK" endterm="SQL-ROLLBACK-TITLE">
152154
to terminate a transaction.
153155
</para>
156+
157+
<para>
158+
Refer to <xref linkend="sql-lock" endterm="sql-lock-title">
159+
for further information
160+
about locking tables inside a transaction.
161+
</para>
162+
163+
<para>
164+
If you turn <literal>autocommit</> mode off, then <command>BEGIN</>
165+
is not required: any SQL command automatically starts a transaction.
166+
</para>
154167
</refsect2>
155168
</refsect1>
156169

doc/src/sgml/ref/start_transaction.sgml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/start_transaction.sgml,v 1.2 2002/08/06 05:32:16 momjian Exp $ -->
1+
<!--
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/start_transaction.sgml,v 1.3 2002/08/30 22:45:25 tgl Exp $
3+
PostgreSQL documentation
4+
-->
5+
26
<refentry id="SQL-START-TRANSACTION">
37
<docinfo>
48
<date>2002-07-26</date>
@@ -76,7 +80,7 @@ WARNING: BEGIN: already a transaction in progress
7680
This command begins a new transaction. If the isolation level is
7781
specified, the new transaction has that isolation level. In all other
7882
respects, the behavior of this command is identical to the
79-
<command>BEGIN</command> command.
83+
<xref linkend="sql-begin" endterm="sql-begin-title"> command.
8084
</para>
8185

8286
</refsect1>
@@ -87,8 +91,8 @@ WARNING: BEGIN: already a transaction in progress
8791
<para>
8892
The isolation level of a transaction can also be set with the <xref
8993
linkend="sql-set-transaction" endterm="sql-set-transaction-title">
90-
command. If no isolation level is specified, the level defaults to
91-
<option>READ COMMITTED</option>.
94+
command. If no isolation level is specified, the default isolation
95+
level is used.
9296
</para>
9397
</refsect1>
9498

@@ -99,11 +103,14 @@ WARNING: BEGIN: already a transaction in progress
99103
<title>SQL99</title>
100104

101105
<para>
102-
<option>SERIALIZABLE</option> is the default level in
103-
<acronym>SQL</acronym>. <productname>PostgreSQL</productname>
106+
<option>SERIALIZABLE</option> is the default isolation level in
107+
<acronym>SQL99</acronym>, but it is not the usual default in
108+
<productname>PostgreSQL</productname>: the factory default setting
109+
is READ COMMITTED.
110+
<productname>PostgreSQL</productname>
104111
does not provide the isolation levels <option>READ UNCOMMITTED</option>
105-
and <option>REPEATABLE READ</option>. Because of multiversion
106-
concurrency control, the <option>SERIALIZABLE</option> level is
112+
and <option>REPEATABLE READ</option>. Because of lack of predicate
113+
locking, the <option>SERIALIZABLE</option> level is
107114
not truly serializable. See the <citetitle>User's Guide</citetitle>
108115
for details.
109116
</para>

0 commit comments

Comments
 (0)