mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
Fix another case in which autovacuum would fail while analyzing
expressional indexes. Per report from Brian Hirt.
This commit is contained in:
parent
507e07e277
commit
e0078ea22d
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.319 2005/11/22 18:17:09 momjian Exp $
|
* $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.320 2006/01/04 19:16:24 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -510,6 +510,14 @@ vacuum(VacuumStmt *vacstmt, List *relids)
|
|||||||
* PostgresMain().
|
* PostgresMain().
|
||||||
*/
|
*/
|
||||||
StartTransactionCommand();
|
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)
|
if (vacstmt->vacuum)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user