Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
9c279355
Commit
9c279355
authored
Aug 30, 2002
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates to reflect availability of autocommit option.
parent
26993b29
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
25 deletions
+45
-25
doc/src/sgml/ref/begin.sgml
doc/src/sgml/ref/begin.sgml
+30
-17
doc/src/sgml/ref/start_transaction.sgml
doc/src/sgml/ref/start_transaction.sgml
+15
-8
No files found.
doc/src/sgml/ref/begin.sgml
View file @
9c279355
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/begin.sgml,v 1.1
8 2002/08/04 04:31:44 momjian
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/begin.sgml,v 1.1
9 2002/08/30 22:45:25 tgl
Exp $
PostgreSQL documentation
-->
...
...
@@ -103,33 +103,35 @@ WARNING: BEGIN: already a transaction in progress
<command>BEGIN</command> initiates a user transaction in chained mode,
i.e., all user statements after <command>BEGIN</command> command will
be executed in a single transaction until an explicit
<xref linkend="sql-commit" endterm="sql-commit-title">
,
<xref linkend="sql-rollback" endterm="sql-rollback-title">
,
or execution abort. Statements in chained mode are executed much faster,
<xref linkend="sql-commit" endterm="sql-commit-title">
or
<xref linkend="sql-rollback" endterm="sql-rollback-title">
.
Statements are executed more quickly in chained mode,
because transaction start/commit requires significant CPU and disk
activity. Execution of multiple statements inside a transaction
is also required for consistency when changing several
related tables.
is also useful to ensure consistency when changing several
related tables: other clients will be unable to see the intermediate
states wherein not all the related updates have been done.
</para>
<para>
The default transaction isolation level in
<productname>PostgreSQL</productname>
is READ COMMITTED, where
queries inside the transaction see only
changes
committed before
query
execution. So, you have to use
is READ COMMITTED, where
in each query inside the transaction sees
changes
committed before
that query begins
execution. So, you have to use
<command>SET TRANSACTION ISOLATION LEVEL SERIALIZABLE</command>
just after <command>BEGIN</command> if you need more rigorous transaction isolation.
just after <command>BEGIN</command> if you need more rigorous transaction
isolation. (Alternatively, you can change the default transaction
isolation level; see the <citetitle>PostgreSQL Administrator's
Guide</citetitle> for details.)
In SERIALIZABLE mode queries will see only changes committed before
the entire
transaction began (actually, before execution of the first DML statement
in
a serializabl
e transaction).
in
th
e transaction).
</para>
<para>
If the transaction is committed, <productname>PostgreSQL</productname>
will ensure either that all updates are done or else that none of
them are done. Transactions have the standard <acronym>ACID</acronym>
(atomic, consistent, isolatable, and durable) property.
Transactions have the standard <acronym>ACID</acronym>
(atomic, consistent, isolatable, and durable) properties.
</para>
<refsect2 id="R2-SQL-BEGIN-3">
...
...
@@ -140,9 +142,9 @@ WARNING: BEGIN: already a transaction in progress
Notes
</title>
<para>
Refer to <xref linkend="sql-lock" endterm="sql-lock-title">
for further information
a
bout locking tables inside a transaction
.
<xref linkend="sql-start-transaction"
endterm="sql-start-transaction-title"> has the same functionality
a
s <command>BEGIN</>
.
</para>
<para>
...
...
@@ -151,6 +153,17 @@ WARNING: BEGIN: already a transaction in progress
<xref linkend="SQL-ROLLBACK" endterm="SQL-ROLLBACK-TITLE">
to terminate a transaction.
</para>
<para>
Refer to <xref linkend="sql-lock" endterm="sql-lock-title">
for further information
about locking tables inside a transaction.
</para>
<para>
If you turn <literal>autocommit</> mode off, then <command>BEGIN</>
is not required: any SQL command automatically starts a transaction.
</para>
</refsect2>
</refsect1>
...
...
doc/src/sgml/ref/start_transaction.sgml
View file @
9c279355
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/start_transaction.sgml,v 1.2 2002/08/06 05:32:16 momjian Exp $ -->
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/start_transaction.sgml,v 1.3 2002/08/30 22:45:25 tgl Exp $
PostgreSQL documentation
-->
<refentry id="SQL-START-TRANSACTION">
<docinfo>
<date>2002-07-26</date>
...
...
@@ -76,7 +80,7 @@ WARNING: BEGIN: already a transaction in progress
This command begins a new transaction. If the isolation level is
specified, the new transaction has that isolation level. In all other
respects, the behavior of this command is identical to the
<
command>BEGIN</command
> command.
<
xref linkend="sql-begin" endterm="sql-begin-title"
> command.
</para>
</refsect1>
...
...
@@ -87,8 +91,8 @@ WARNING: BEGIN: already a transaction in progress
<para>
The isolation level of a transaction can also be set with the <xref
linkend="sql-set-transaction" endterm="sql-set-transaction-title">
command. If no isolation level is specified, the
level defaults to
<option>READ COMMITTED</option>
.
command. If no isolation level is specified, the
default isolation
level is used
.
</para>
</refsect1>
...
...
@@ -99,11 +103,14 @@ WARNING: BEGIN: already a transaction in progress
<title>SQL99</title>
<para>
<option>SERIALIZABLE</option> is the default level in
<acronym>SQL</acronym>. <productname>PostgreSQL</productname>
<option>SERIALIZABLE</option> is the default isolation level in
<acronym>SQL99</acronym>, but it is not the usual default in
<productname>PostgreSQL</productname>: the factory default setting
is READ COMMITTED.
<productname>PostgreSQL</productname>
does not provide the isolation levels <option>READ UNCOMMITTED</option>
and <option>REPEATABLE READ</option>. Because of
multiversion
concurrency control
, the <option>SERIALIZABLE</option> level is
and <option>REPEATABLE READ</option>. Because of
lack of predicate
locking
, the <option>SERIALIZABLE</option> level is
not truly serializable. See the <citetitle>User's Guide</citetitle>
for details.
</para>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment