|
14 | 14 | *
|
15 | 15 | *
|
16 | 16 | * 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 $ |
18 | 18 | *
|
19 | 19 | *-------------------------------------------------------------------------
|
20 | 20 | */
|
@@ -938,9 +938,10 @@ vacuum_rel(Oid relid, VacuumStmt *vacstmt, bool do_toast, bool for_wraparound,
|
938 | 938 |
|
939 | 939 | /*
|
940 | 940 | * 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. |
942 | 943 | */
|
943 |
| -if (do_toast) |
| 944 | +if (do_toast&& !(vacstmt->options&VACOPT_FULL)) |
944 | 945 | toast_relid=onerel->rd_rel->reltoastrelid;
|
945 | 946 | else
|
946 | 947 | toast_relid=InvalidOid;
|
|