|
10 | 10 | * |
11 | 11 | * |
12 | 12 | * IDENTIFICATION |
13 | | - * $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.34 2007/03/13 00:33:41 tgl Exp $ |
| 13 | + * $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.35 2007/03/23 20:56:39 alvherre Exp $ |
14 | 14 | * |
15 | 15 | *------------------------------------------------------------------------- |
16 | 16 | */ |
@@ -1237,32 +1237,28 @@ static void |
1237 | 1237 | autovacuum_do_vac_analyze(Oid relid, bool dovacuum, bool doanalyze, |
1238 | 1238 | int freeze_min_age) |
1239 | 1239 | { |
1240 | | - VacuumStmt *vacstmt; |
| 1240 | + VacuumStmt vacstmt; |
1241 | 1241 | MemoryContext old_cxt; |
1242 | 1242 |
|
1243 | 1243 | /* |
1244 | | - * The node must survive transaction boundaries, so make sure we create it |
| 1244 | + * The list must survive transaction boundaries, so make sure we create it |
1245 | 1245 | * in a long-lived context |
1246 | 1246 | */ |
1247 | 1247 | old_cxt = MemoryContextSwitchTo(AutovacMemCxt); |
1248 | 1248 |
|
1249 | | - vacstmt = makeNode(VacuumStmt); |
1250 | | - |
1251 | 1249 | /* Set up command parameters */ |
1252 | | - vacstmt->vacuum = dovacuum; |
1253 | | - vacstmt->full = false; |
1254 | | - vacstmt->analyze = doanalyze; |
1255 | | - vacstmt->freeze_min_age = freeze_min_age; |
1256 | | - vacstmt->verbose = false; |
1257 | | - vacstmt->relation = NULL; /* not used since we pass a relids list */ |
1258 | | - vacstmt->va_cols = NIL; |
| 1250 | + vacstmt.vacuum = dovacuum; |
| 1251 | + vacstmt.full = false; |
| 1252 | + vacstmt.analyze = doanalyze; |
| 1253 | + vacstmt.freeze_min_age = freeze_min_age; |
| 1254 | + vacstmt.verbose = false; |
| 1255 | + vacstmt.relation = NULL; /* not used since we pass a relids list */ |
| 1256 | + vacstmt.va_cols = NIL; |
1259 | 1257 |
|
1260 | 1258 | /* Let pgstat know what we're doing */ |
1261 | | - autovac_report_activity(vacstmt, relid); |
1262 | | - |
1263 | | - vacuum(vacstmt, list_make1_oid(relid), true); |
| 1259 | + autovac_report_activity(&vacstmt, relid); |
1264 | 1260 |
|
1265 | | - pfree(vacstmt); |
| 1261 | + vacuum(&vacstmt, list_make1_oid(relid), true); |
1266 | 1262 | MemoryContextSwitchTo(old_cxt); |
1267 | 1263 | } |
1268 | 1264 |
|
|
0 commit comments