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

Commite6107da

Browse files
committed
Turn off zero_damaged_pages in the right place (ie, in the autovac
process not in the postmaster) and with the right GucSource (needs tobe a nontransactional source since we've not started an xact yet).
1 parent8d51c27 commite6107da

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

‎src/backend/postmaster/autovacuum.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* 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 $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -125,9 +125,6 @@ autovac_start(void)
125125
if (!AutoVacuumingActive())
126126
return0;
127127

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-
131128
/*
132129
* Do nothing if too soon since last autovacuum exit. This limits how
133130
* often the daemon runs. Since the time per iteration can be quite
@@ -307,6 +304,13 @@ AutoVacMain(int argc, char *argv[])
307304

308305
PG_SETMASK(&UnBlockSig);
309306

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+
310314
/* Get a list of databases */
311315
dblist=autovac_get_database_list();
312316

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp