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

Commit bc4b856

Browse files
author
Neil Conway
committed
Add text to the VACUUM, REINDEX, DROP TABLESPACE and CREATE TABLESPACE
reference pages documenting that these commands cannot be used within a transaction block. Also make some minor improvements to the psql reference page. Patch from Simon Riggs, minor editorialization by myself.
1 parent 0b9f93e commit bc4b856

File tree

6 files changed

+42
-15
lines changed

6 files changed

+42
-15
lines changed

doc/src/sgml/ref/cluster.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/cluster.sgml,v 1.36 2006/09/16 00:30:17 momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/cluster.sgml,v 1.37 2006/10/31 01:52:31 neilc Exp $
33
PostgreSQL documentation
44
-->
55

@@ -60,8 +60,8 @@ CLUSTER
6060
in the
6161
current database that the calling user owns, or all tables if called
6262
by a superuser. (Never-clustered tables are not included.) This
63-
form of <command>CLUSTER</command> cannot be called from inside a
64-
transaction or function.
63+
form of <command>CLUSTER</command> cannot be executed inside a transaction
64+
block.
6565
</para>
6666

6767
<para>

doc/src/sgml/ref/create_tablespace.sgml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/create_tablespace.sgml,v 1.6 2006/09/16 00:30:17 momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/create_tablespace.sgml,v 1.7 2006/10/31 01:52:31 neilc Exp $
33
PostgreSQL documentation
44
-->
55

@@ -95,6 +95,11 @@ CREATE TABLESPACE <replaceable class="parameter">tablespacename</replaceable> [
9595
<para>
9696
Tablespaces are only supported on systems that support symbolic links.
9797
</para>
98+
99+
<para>
100+
<command>CREATE TABLESPACE</> cannot be executed inside a transaction
101+
block.
102+
</para>
98103
</refsect1>
99104

100105
<refsect1>

doc/src/sgml/ref/drop_tablespace.sgml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_tablespace.sgml,v 1.4 2006/09/16 00:30:18 momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_tablespace.sgml,v 1.5 2006/10/31 01:52:31 neilc Exp $
33
PostgreSQL documentation
44
-->
55

@@ -66,6 +66,15 @@ DROP TABLESPACE [ IF EXISTS ] <replaceable class="PARAMETER">tablespacename</rep
6666
</variablelist>
6767
</refsect1>
6868

69+
<refsect1>
70+
<title>Notes</title>
71+
72+
<para>
73+
<command>DROP TABLESPACE</> cannot be executed inside a transaction block.
74+
</para>
75+
</refsect1>
76+
77+
6978
<refsect1>
7079
<title>Examples</title>
7180

doc/src/sgml/ref/psql-ref.sgml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.172 2006/10/23 18:10:32 petere Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.173 2006/10/31 01:52:31 neilc Exp $
33
PostgreSQL documentation
44
-->
55

@@ -94,9 +94,10 @@ PostgreSQL documentation
9494
<para>
9595
If the command string contains multiple SQL commands, they are
9696
processed in a single transaction, unless there are explicit
97-
BEGIN/COMMIT commands included in the string to divide it into
98-
multiple transactions. This is different from the behavior when
99-
the same string is fed to <application>psql</application>'s standard input.
97+
<command>BEGIN</>/<command>COMMIT</> commands included in the
98+
string to divide it into multiple transactions. This is
99+
different from the behavior when the same string is fed to
100+
<application>psql</application>'s standard input.
100101
</para>
101102
</listitem>
102103
</varlistentry>
@@ -472,9 +473,14 @@ PostgreSQL documentation
472473
<option>-f</> option, adding this option wraps
473474
<command>BEGIN</>/<command>COMMIT</> around the script to execute it
474475
as a single transaction. This ensures that either all the commands
475-
complete successfully, or no changes are applied. (However, if the
476-
script itself uses <command>BEGIN</> or <command>COMMIT</>, this
477-
option will not have the desired effect!)
476+
complete successfully, or no changes are applied.
477+
</para>
478+
479+
<para>
480+
If the script itself uses <command>BEGIN</>, <command>COMMIT</>
481+
or any command that cannot be executed inside a transaction
482+
block, specifying this option will cause the transaction to be
483+
aborted.
478484
</para>
479485
</listitem>
480486
</varlistentry>

doc/src/sgml/ref/reindex.sgml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/reindex.sgml,v 1.33 2006/09/16 00:30:19 momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/reindex.sgml,v 1.34 2006/10/31 01:52:31 neilc Exp $
33
PostgreSQL documentation
44
-->
55

@@ -106,7 +106,8 @@ REINDEX { INDEX | TABLE | DATABASE | SYSTEM } <replaceable class="PARAMETER">nam
106106
<para>
107107
Recreate all indexes within the current database.
108108
Indexes on shared system catalogs are skipped except in stand-alone mode
109-
(see below).
109+
(see below). This form of <command>REINDEX</command> cannot be executed
110+
inside a transaction block.
110111
</para>
111112
</listitem>
112113
</varlistentry>
@@ -118,6 +119,8 @@ REINDEX { INDEX | TABLE | DATABASE | SYSTEM } <replaceable class="PARAMETER">nam
118119
Recreate all indexes on system catalogs within the current database.
119120
Indexes on user tables are not processed. Also, indexes on shared
120121
system catalogs are skipped except in stand-alone mode (see below).
122+
This form of <command>REINDEX</command> cannot be executed inside a
123+
transaction block.
121124
</para>
122125
</listitem>
123126
</varlistentry>

doc/src/sgml/ref/vacuum.sgml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/vacuum.sgml,v 1.41 2006/09/16 00:30:20 momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/vacuum.sgml,v 1.42 2006/10/31 01:52:31 neilc Exp $
33
PostgreSQL documentation
44
-->
55

@@ -155,6 +155,10 @@ VACUUM [ FULL | FREEZE ] [ VERBOSE ] ANALYZE [ <replaceable class="PARAMETER">ta
155155
<refsect1>
156156
<title>Notes</title>
157157

158+
<para>
159+
<command>VACUUM</> cannot be executed inside a transaction block.
160+
</para>
161+
158162
<para>
159163
We recommend that active production databases be
160164
vacuumed frequently (at least nightly), in order to

0 commit comments

Comments
 (0)