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

Commitb4bd6f6

Browse files
committed
pg_upgrade: remove reference to autovacuum_multixact_freeze_max_age
autovacuum_multixact_freeze_max_age was added as a pg_ctl startparameter in 9.3.X to prevent autovacuum from running. However, onlysome 9.3.X releases have autovacuum_multixact_freeze_max_age as it wasadded in a minor PG 9.3 release. It also isn't needed because -b turnsoff autovacuum in 9.1+.Without this fix, trying to upgrade from an early 9.3 release to 9.4would fail.Report by EDBBackpatch through 9.3
1 parentcd74a15 commitb4bd6f6

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

‎contrib/pg_upgrade/server.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -202,26 +202,25 @@ start_postmaster(ClusterInfo *cluster, bool throw_error)
202202
#endif
203203

204204
/*
205-
* Using autovacuum=off disables cleanup vacuum and analyze, but freeze
206-
* vacuums can still happen, so we set autovacuum_freeze_max_age and
207-
* autovacuum_multixact_freeze_max_age to their maximums. We assume all
208-
* datfrozenxid, relfrozenxid, and relminmxid values are less than a gap
209-
* of 2000000000 from the current xid counter, so autovacuum will not
210-
* touch them.
205+
* Since PG 9.1, we have used -b to disable autovacuum. For earlier
206+
* releases, setting autovacuum=off disables cleanup vacuum and analyze,
207+
* but freeze vacuums can still happen, so we set autovacuum_freeze_max_age
208+
* to its maximum. (autovacuum_multixact_freeze_max_age was introduced
209+
* after 9.1, so there is no need to set that.) We assume all datfrozenxid
210+
* and relfrozenxid values are less than a gap of 2000000000 from the current
211+
* xid counter, so autovacuum will not touch them.
211212
*
212213
* Turn off durability requirements to improve object creation speed, and
213214
* we only modify the new cluster, so only use it there. If there is a
214215
* crash, the new cluster has to be recreated anyway. fsync=off is a big
215216
* win on ext4.
216217
*/
217218
snprintf(cmd,sizeof(cmd),
218-
"\"%s/pg_ctl\" -w -l \"%s\" -D \"%s\" -o \"-p %d%s%s %s%s%s\" start",
219+
"\"%s/pg_ctl\" -w -l \"%s\" -D \"%s\" -o \"-p %d%s%s %s%s\" start",
219220
cluster->bindir,SERVER_LOG_FILE,cluster->pgconfig,cluster->port,
220221
(cluster->controldata.cat_ver >=
221222
BINARY_UPGRADE_SERVER_FLAG_CAT_VER) ?" -b" :
222223
" -c autovacuum=off -c autovacuum_freeze_max_age=2000000000",
223-
(GET_MAJOR_VERSION(cluster->major_version) >=903) ?
224-
" -c autovacuum_multixact_freeze_max_age=2000000000" :"",
225224
(cluster==&new_cluster) ?
226225
" -c synchronous_commit=off -c fsync=off -c full_page_writes=off" :"",
227226
cluster->pgopts ?cluster->pgopts :"",socket_string);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp