|
13 | 13 | *
|
14 | 14 | *
|
15 | 15 | * 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 $ |
17 | 17 | *
|
18 | 18 | *-------------------------------------------------------------------------
|
19 | 19 | */
|
@@ -510,6 +510,14 @@ vacuum(VacuumStmt *vacstmt, List *relids)
|
510 | 510 | * PostgresMain().
|
511 | 511 | */
|
512 | 512 | 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()); |
513 | 521 | }
|
514 | 522 |
|
515 | 523 | if (vacstmt->vacuum)
|
|