We no longer need a snapshot set after opening the finishing transaction: this
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 19 Mar 2008 14:18:21 +0000 (14:18 +0000)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 19 Mar 2008 14:18:21 +0000 (14:18 +0000)
is redundant because autovacuum now always analyzes a single table per
transaction.

src/backend/commands/vacuum.c

index abd09a64996e16f8bdc8a4d535dad2ed891c7cf9..3e9b2a228682c8cc0a3b7fa17e0103f332833ed5 100644 (file)
@@ -482,15 +482,6 @@ vacuum(VacuumStmt *vacstmt, List *relids,
                 * PostgresMain().
                 */
                StartTransactionCommand();
-
-               /*
-                * Re-establish the transaction snapshot.  This is wasted effort when
-                * we are called as a normal utility command, because the new
-                * transaction will be dropped immediately by PostgresMain(); but it's
-                * necessary if we are called from autovacuum because autovacuum might
-                * continue on to do an ANALYZE-only call.
-                */
-               ActiveSnapshot = CopySnapshot(GetTransactionSnapshot());
        }
 
        if (vacstmt->vacuum && !IsAutoVacuumWorkerProcess())