File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1313 *
1414 *
1515 * IDENTIFICATION
16- * $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.319 2005/11/22 18:17:09 momjian Exp $
16+ * $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.320 2006/01/04 19:16:24 tgl Exp $
1717 *
1818 *-------------------------------------------------------------------------
1919 */
@@ -510,6 +510,14 @@ vacuum(VacuumStmt *vacstmt, List *relids)
510510 * PostgresMain().
511511 */
512512 StartTransactionCommand ();
513+ /*
514+ * Re-establish the transaction snapshot. This is wasted effort
515+ * when we are called as a normal utility command, because the
516+ * new transaction will be dropped immediately by PostgresMain();
517+ * but it's necessary if we are called from autovacuum because
518+ * autovacuum might continue on to do an ANALYZE-only call.
519+ */
520+ ActiveSnapshot = CopySnapshot (GetTransactionSnapshot ());
513521 }
514522
515523 if (vacstmt -> vacuum )
You can’t perform that action at this time.
0 commit comments