On Mon, 2006-10-30 at 19:28 -0500, Tom Lane wrote:
> Neil Conway <[EMAIL PROTECTED]> writes:
> > On Mon, 2006-10-30 at 22:56 +0000, Simon Riggs wrote:
> >> The man pages for VACUUM, CREATE TABLESPACE, CLUSTER and
> >> REINDEX DATABASE don't mention they are not allowed inside a transaction
> >> block at all
> 
> > That should be fixed, I think. Once that is done, I think it's
> > sufficient to just say that --single-transaction won't work for commands
> > that can't be executed in a transaction block.
> 
> That's what makes sense to me, too.

As requested.

-- 
  Simon Riggs             
  EnterpriseDB   http://www.enterprisedb.com

Index: doc/src/sgml/ref/cluster.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/cluster.sgml,v
retrieving revision 1.36
diff -c -r1.36 cluster.sgml
*** doc/src/sgml/ref/cluster.sgml	16 Sep 2006 00:30:17 -0000	1.36
--- doc/src/sgml/ref/cluster.sgml	31 Oct 2006 01:05:48 -0000
***************
*** 60,67 ****
     in the
     current database that the calling user owns, or all tables if called
     by a superuser.  (Never-clustered tables are not included.)  This
!    form of <command>CLUSTER</command> cannot be called from inside a
!    transaction or function.
    </para>
  
    <para>
--- 60,67 ----
     in the
     current database that the calling user owns, or all tables if called
     by a superuser.  (Never-clustered tables are not included.)  This
!    form of <command>CLUSTER</command> cannot be executed inside a transaction
!    block.
    </para>
  
    <para>
Index: doc/src/sgml/ref/create_tablespace.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/create_tablespace.sgml,v
retrieving revision 1.6
diff -c -r1.6 create_tablespace.sgml
*** doc/src/sgml/ref/create_tablespace.sgml	16 Sep 2006 00:30:17 -0000	1.6
--- doc/src/sgml/ref/create_tablespace.sgml	31 Oct 2006 01:05:48 -0000
***************
*** 95,100 ****
--- 95,105 ----
    <para>
     Tablespaces are only supported on systems that support symbolic links.
    </para>
+ 
+    <para>
+     <command>CREATE TABLESPACE</> cannot be executed inside a transaction
+     block.
+    </para>
   </refsect1>
  
   <refsect1>
Index: doc/src/sgml/ref/drop_tablespace.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/drop_tablespace.sgml,v
retrieving revision 1.4
diff -c -r1.4 drop_tablespace.sgml
*** doc/src/sgml/ref/drop_tablespace.sgml	16 Sep 2006 00:30:18 -0000	1.4
--- doc/src/sgml/ref/drop_tablespace.sgml	31 Oct 2006 01:05:49 -0000
***************
*** 67,72 ****
--- 67,81 ----
   </refsect1>
  
   <refsect1>
+   <title>Notes</title>
+ 
+    <para>
+     <command>DROP TABLESPACE</> cannot be executed inside a transaction block.
+    </para>
+  </refsect1>
+ 
+ 
+  <refsect1>
    <title>Examples</title>
  
    <para>
Index: doc/src/sgml/ref/psql-ref.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v
retrieving revision 1.172
diff -c -r1.172 psql-ref.sgml
*** doc/src/sgml/ref/psql-ref.sgml	23 Oct 2006 18:10:32 -0000	1.172
--- doc/src/sgml/ref/psql-ref.sgml	31 Oct 2006 01:05:50 -0000
***************
*** 472,480 ****
          <option>-f</> option, adding this option wraps
          <command>BEGIN</>/<command>COMMIT</> around the script to execute it
          as a single transaction.  This ensures that either all the commands
!         complete successfully, or no changes are applied.  (However, if the
!         script itself uses <command>BEGIN</> or <command>COMMIT</>, this
!         option will not have the desired effect!)
         </para>
        </listitem>
       </varlistentry>
--- 472,489 ----
          <option>-f</> option, adding this option wraps
          <command>BEGIN</>/<command>COMMIT</> around the script to execute it
          as a single transaction.  This ensures that either all the commands
!         complete successfully, or no changes are applied.  
!        </para>
!        <para>
!         However, if the script itself uses <command>BEGIN</>, <command>COMMIT</> or any
!         commands that cannot be executed inside a transaction block then this option
!         will simply cause all changes to fail. See the individual command manual pages.
!        </para>
!        <para>
!         You are advised to set the following variable when using this option:
! <programlisting>
! \set ON_ERROR_STOP
! </programlisting>
         </para>
        </listitem>
       </varlistentry>
Index: doc/src/sgml/ref/reindex.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/reindex.sgml,v
retrieving revision 1.33
diff -c -r1.33 reindex.sgml
*** doc/src/sgml/ref/reindex.sgml	16 Sep 2006 00:30:19 -0000	1.33
--- doc/src/sgml/ref/reindex.sgml	31 Oct 2006 01:05:50 -0000
***************
*** 106,112 ****
       <para>
        Recreate all indexes within the current database.
        Indexes on shared system catalogs are skipped except in stand-alone mode
!       (see below).
       </para>
      </listitem>
     </varlistentry>
--- 106,113 ----
       <para>
        Recreate all indexes within the current database.
        Indexes on shared system catalogs are skipped except in stand-alone mode
!       (see below). This form of <command>REINDEX</command> cannot be executed 
!       inside a transaction block.
       </para>
      </listitem>
     </varlistentry>
***************
*** 118,123 ****
--- 119,126 ----
        Recreate all indexes on system catalogs within the current database.
        Indexes on user tables are not processed.  Also, indexes on shared
        system catalogs are skipped except in stand-alone mode (see below).
+       This form of <command>REINDEX</command> cannot be executed inside a
+       transaction block.
       </para>
      </listitem>
     </varlistentry>
Index: doc/src/sgml/ref/vacuum.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/vacuum.sgml,v
retrieving revision 1.41
diff -c -r1.41 vacuum.sgml
*** doc/src/sgml/ref/vacuum.sgml	16 Sep 2006 00:30:20 -0000	1.41
--- doc/src/sgml/ref/vacuum.sgml	31 Oct 2006 01:05:50 -0000
***************
*** 156,161 ****
--- 156,165 ----
    <title>Notes</title>
  
     <para>
+     <command>VACUUM</> cannot be executed inside a transaction block.
+    </para>
+ 
+    <para>
      We recommend that active production databases be
      vacuumed frequently (at least nightly), in order to
      remove expired rows. After adding or deleting a large number
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to