I have applied the attached patch to remove a reference to
autovacuum_multixact_freeze_max_age.

autovacuum_multixact_freeze_max_age was added as a pg_ctl start
parameter in 9.3.X to prevent autovacuum from running.  However, only
some 9.3.X releases have autovacuum_multixact_freeze_max_age as it was
added in a minor PG 9.3 release.  It also isn't needed because -b turns
off autovacuum in 9.1+.

Without this fix, trying to upgrade from an early 9.3 release to 9.4
would fail.

This was reported by EDB during testing.

-- 
  Bruce Momjian  <br...@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +
diff --git a/contrib/pg_upgrade/server.c b/contrib/pg_upgrade/server.c
new file mode 100644
index 901aa21..3d041ef
*** a/contrib/pg_upgrade/server.c
--- b/contrib/pg_upgrade/server.c
*************** start_postmaster(ClusterInfo *cluster, b
*** 202,213 ****
  #endif
  
  	/*
! 	 * Using autovacuum=off disables cleanup vacuum and analyze, but freeze
! 	 * vacuums can still happen, so we set autovacuum_freeze_max_age and
! 	 * autovacuum_multixact_freeze_max_age to their maximums.  We assume all
! 	 * datfrozenxid, relfrozenxid, and relminmxid values are less than a gap
! 	 * of 2000000000 from the current xid counter, so autovacuum will not
! 	 * touch them.
  	 *
  	 * Turn off durability requirements to improve object creation speed, and
  	 * we only modify the new cluster, so only use it there.  If there is a
--- 202,214 ----
  #endif
  
  	/*
! 	 * Since PG 9.1, we have used -b to disable autovacuum.  For earlier
! 	 * releases, setting autovacuum=off disables cleanup vacuum and analyze,
! 	 * but freeze vacuums can still happen, so we set autovacuum_freeze_max_age
! 	 * to its maximum.  (autovacuum_multixact_freeze_max_age was introduced
! 	 * after 9.1, so there is no need to set that.)  We assume all datfrozenxid
! 	 * and relfrozenxid values are less than a gap of 2000000000 from the current
! 	 * xid counter, so autovacuum will not touch them.
  	 *
  	 * Turn off durability requirements to improve object creation speed, and
  	 * we only modify the new cluster, so only use it there.  If there is a
*************** start_postmaster(ClusterInfo *cluster, b
*** 215,227 ****
  	 * win on ext4.
  	 */
  	snprintf(cmd, sizeof(cmd),
! 		  "\"%s/pg_ctl\" -w -l \"%s\" -D \"%s\" -o \"-p %d%s%s %s%s%s\" start",
  		  cluster->bindir, SERVER_LOG_FILE, cluster->pgconfig, cluster->port,
  			 (cluster->controldata.cat_ver >=
  			  BINARY_UPGRADE_SERVER_FLAG_CAT_VER) ? " -b" :
  			 " -c autovacuum=off -c autovacuum_freeze_max_age=2000000000",
- 			 (GET_MAJOR_VERSION(cluster->major_version) >= 903) ?
- 			 " -c autovacuum_multixact_freeze_max_age=2000000000" : "",
  			 (cluster == &new_cluster) ?
  	  " -c synchronous_commit=off -c fsync=off -c full_page_writes=off" : "",
  			 cluster->pgopts ? cluster->pgopts : "", socket_string);
--- 216,226 ----
  	 * win on ext4.
  	 */
  	snprintf(cmd, sizeof(cmd),
! 		  "\"%s/pg_ctl\" -w -l \"%s\" -D \"%s\" -o \"-p %d%s%s %s%s\" start",
  		  cluster->bindir, SERVER_LOG_FILE, cluster->pgconfig, cluster->port,
  			 (cluster->controldata.cat_ver >=
  			  BINARY_UPGRADE_SERVER_FLAG_CAT_VER) ? " -b" :
  			 " -c autovacuum=off -c autovacuum_freeze_max_age=2000000000",
  			 (cluster == &new_cluster) ?
  	  " -c synchronous_commit=off -c fsync=off -c full_page_writes=off" : "",
  			 cluster->pgopts ? cluster->pgopts : "", socket_string);
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to