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

Commit9184cc7

Browse files
committed
Fix serious performance bug in new implementation of VACUUM FULL:
cluster_rel necessarily builds an all-new toast table, so it's useless tothen go and VACUUM FULL the toast table.
1 parentdfc9028 commit9184cc7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/backend/commands/vacuum.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
*
1616
* IDENTIFICATION
17-
* $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.405 2010/02/0804:33:53 tgl Exp $
17+
* $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.406 2010/02/0816:50:21 tgl Exp $
1818
*
1919
*-------------------------------------------------------------------------
2020
*/
@@ -938,9 +938,10 @@ vacuum_rel(Oid relid, VacuumStmt *vacstmt, bool do_toast, bool for_wraparound,
938938

939939
/*
940940
* Remember the relation's TOAST relation for later, if the caller asked
941-
* us to process it.
941+
* us to process it. In VACUUM FULL, though, the toast table is
942+
* automatically rebuilt by cluster_rel so we shouldn't recurse to it.
942943
*/
943-
if (do_toast)
944+
if (do_toast&& !(vacstmt->options&VACOPT_FULL))
944945
toast_relid=onerel->rd_rel->reltoastrelid;
945946
else
946947
toast_relid=InvalidOid;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp