git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8d51c27)
Turn off zero_damaged_pages in the right place (ie, in the autovac
Tue, 7 Mar 2006 17:32:22 +0000 (17:32 +0000)
Tue, 7 Mar 2006 17:32:22 +0000 (17:32 +0000)
process not in the postmaster) and with the right GucSource (needs to
be a nontransactional source since we've not started an xact yet).


diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c
index 76295f47dd289d4ad64214b964a8a54beb9aa6c9..d98f47f9b73f93bd2f519bb8c8a852ada539ff95 100644 (file)
--- a/src/backend/postmaster/autovacuum.c
+++ b/src/backend/postmaster/autovacuum.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.14 2006年03月07日 03:03:09 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.15 2006年03月07日 17:32:22 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -125,9 +125,6 @@ autovac_start(void)
if (!AutoVacuumingActive())
return 0;
- /* Even if zero_damaged_pages is true, we don't want autovacuum zeroing. */
- SetConfigOption("zero_damaged_pages", "false", PGC_SUSET, PGC_S_SESSION);
-
/*
* Do nothing if too soon since last autovacuum exit. This limits how
* often the daemon runs. Since the time per iteration can be quite
@@ -307,6 +304,13 @@ AutoVacMain(int argc, char *argv[])
PG_SETMASK(&UnBlockSig);
+ /*
+ * Force zero_damaged_pages OFF in the autovac process, even if it is
+ * set in postgresql.conf. We don't really want such a dangerous option
+ * being applied non-interactively.
+ */
+ SetConfigOption("zero_damaged_pages", "false", PGC_SUSET, PGC_S_OVERRIDE);
+
/* Get a list of databases */
dblist = autovac_get_database_list();
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /