|
10 | 10 | *
|
11 | 11 | *
|
12 | 12 | * IDENTIFICATION
|
13 |
| - * $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.14 2006/03/0703:03:09 momjian Exp $ |
| 13 | + * $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.15 2006/03/0717:32:22 tgl Exp $ |
14 | 14 | *
|
15 | 15 | *-------------------------------------------------------------------------
|
16 | 16 | */
|
@@ -125,9 +125,6 @@ autovac_start(void)
|
125 | 125 | if (!AutoVacuumingActive())
|
126 | 126 | return0;
|
127 | 127 |
|
128 |
| -/* Even if zero_damaged_pages is true, we don't want autovacuum zeroing. */ |
129 |
| -SetConfigOption("zero_damaged_pages","false",PGC_SUSET,PGC_S_SESSION); |
130 |
| - |
131 | 128 | /*
|
132 | 129 | * Do nothing if too soon since last autovacuum exit. This limits how
|
133 | 130 | * often the daemon runs. Since the time per iteration can be quite
|
@@ -307,6 +304,13 @@ AutoVacMain(int argc, char *argv[])
|
307 | 304 |
|
308 | 305 | PG_SETMASK(&UnBlockSig);
|
309 | 306 |
|
| 307 | +/* |
| 308 | + * Force zero_damaged_pages OFF in the autovac process, even if it is |
| 309 | + * set in postgresql.conf. We don't really want such a dangerous option |
| 310 | + * being applied non-interactively. |
| 311 | + */ |
| 312 | +SetConfigOption("zero_damaged_pages","false",PGC_SUSET,PGC_S_OVERRIDE); |
| 313 | + |
310 | 314 | /* Get a list of databases */
|
311 | 315 | dblist=autovac_get_database_list();
|
312 | 316 |
|
|