Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite0078ea

Browse files
committed
Fix another case in which autovacuum would fail while analyzing
expressional indexes. Per report from Brian Hirt.
1 parent507e07e commite0078ea

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

‎src/backend/commands/vacuum.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
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)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp