@@ -4395,17 +4395,21 @@ ReadControlFile(void)
43954395ereport (FATAL ,
43964396(errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
43974397errmsg ("database files are incompatible with server" ),
4398- errdetail ("The database cluster was initialized with CATALOG_VERSION_NO %d,"
4399- " but the server was compiled with CATALOG_VERSION_NO %d." ,
4400- ControlFile -> catalog_version_no ,CATALOG_VERSION_NO ),
4398+ /* translator: %s is a variable name and %d is its value */
4399+ errdetail ("The database cluster was initialized with %s %d,"
4400+ " but the server was compiled with %s %d." ,
4401+ "CATALOG_VERSION_NO" ,ControlFile -> catalog_version_no ,
4402+ "CATALOG_VERSION_NO" ,CATALOG_VERSION_NO ),
44014403errhint ("It looks like you need to initdb." )));
44024404if (ControlFile -> maxAlign != MAXIMUM_ALIGNOF )
44034405ereport (FATAL ,
44044406(errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
44054407errmsg ("database files are incompatible with server" ),
4406- errdetail ("The database cluster was initialized with MAXALIGN %d,"
4407- " but the server was compiled with MAXALIGN %d." ,
4408- ControlFile -> maxAlign ,MAXIMUM_ALIGNOF ),
4408+ /* translator: %s is a variable name and %d is its value */
4409+ errdetail ("The database cluster was initialized with %s %d,"
4410+ " but the server was compiled with %s %d." ,
4411+ "MAXALIGN" ,ControlFile -> maxAlign ,
4412+ "MAXALIGN" ,MAXIMUM_ALIGNOF ),
44094413errhint ("It looks like you need to initdb." )));
44104414if (ControlFile -> floatFormat != FLOATFORMAT_VALUE )
44114415ereport (FATAL ,
@@ -4417,57 +4421,71 @@ ReadControlFile(void)
44174421ereport (FATAL ,
44184422(errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
44194423errmsg ("database files are incompatible with server" ),
4420- errdetail ("The database cluster was initialized with BLCKSZ %d,"
4421- " but the server was compiled with BLCKSZ %d." ,
4422- ControlFile -> blcksz ,BLCKSZ ),
4424+ /* translator: %s is a variable name and %d is its value */
4425+ errdetail ("The database cluster was initialized with %s %d,"
4426+ " but the server was compiled with %s %d." ,
4427+ "BLCKSZ" ,ControlFile -> blcksz ,
4428+ "BLCKSZ" ,BLCKSZ ),
44234429errhint ("It looks like you need to recompile or initdb." )));
44244430if (ControlFile -> relseg_size != RELSEG_SIZE )
44254431ereport (FATAL ,
44264432(errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
44274433errmsg ("database files are incompatible with server" ),
4428- errdetail ("The database cluster was initialized with RELSEG_SIZE %d,"
4429- " but the server was compiled with RELSEG_SIZE %d." ,
4430- ControlFile -> relseg_size ,RELSEG_SIZE ),
4434+ /* translator: %s is a variable name and %d is its value */
4435+ errdetail ("The database cluster was initialized with %s %d,"
4436+ " but the server was compiled with %s %d." ,
4437+ "RELSEG_SIZE" ,ControlFile -> relseg_size ,
4438+ "RELSEG_SIZE" ,RELSEG_SIZE ),
44314439errhint ("It looks like you need to recompile or initdb." )));
44324440if (ControlFile -> xlog_blcksz != XLOG_BLCKSZ )
44334441ereport (FATAL ,
44344442(errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
44354443errmsg ("database files are incompatible with server" ),
4436- errdetail ("The database cluster was initialized with XLOG_BLCKSZ %d,"
4437- " but the server was compiled with XLOG_BLCKSZ %d." ,
4438- ControlFile -> xlog_blcksz ,XLOG_BLCKSZ ),
4444+ /* translator: %s is a variable name and %d is its value */
4445+ errdetail ("The database cluster was initialized with %s %d,"
4446+ " but the server was compiled with %s %d." ,
4447+ "XLOG_BLCKSZ" ,ControlFile -> xlog_blcksz ,
4448+ "XLOG_BLCKSZ" ,XLOG_BLCKSZ ),
44394449errhint ("It looks like you need to recompile or initdb." )));
44404450if (ControlFile -> nameDataLen != NAMEDATALEN )
44414451ereport (FATAL ,
44424452(errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
44434453errmsg ("database files are incompatible with server" ),
4444- errdetail ("The database cluster was initialized with NAMEDATALEN %d,"
4445- " but the server was compiled with NAMEDATALEN %d." ,
4446- ControlFile -> nameDataLen ,NAMEDATALEN ),
4454+ /* translator: %s is a variable name and %d is its value */
4455+ errdetail ("The database cluster was initialized with %s %d,"
4456+ " but the server was compiled with %s %d." ,
4457+ "NAMEDATALEN" ,ControlFile -> nameDataLen ,
4458+ "NAMEDATALEN" ,NAMEDATALEN ),
44474459errhint ("It looks like you need to recompile or initdb." )));
44484460if (ControlFile -> indexMaxKeys != INDEX_MAX_KEYS )
44494461ereport (FATAL ,
44504462(errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
44514463errmsg ("database files are incompatible with server" ),
4452- errdetail ("The database cluster was initialized with INDEX_MAX_KEYS %d,"
4453- " but the server was compiled with INDEX_MAX_KEYS %d." ,
4454- ControlFile -> indexMaxKeys ,INDEX_MAX_KEYS ),
4464+ /* translator: %s is a variable name and %d is its value */
4465+ errdetail ("The database cluster was initialized with %s %d,"
4466+ " but the server was compiled with %s %d." ,
4467+ "INDEX_MAX_KEYS" ,ControlFile -> indexMaxKeys ,
4468+ "INDEX_MAX_KEYS" ,INDEX_MAX_KEYS ),
44554469errhint ("It looks like you need to recompile or initdb." )));
44564470if (ControlFile -> toast_max_chunk_size != TOAST_MAX_CHUNK_SIZE )
44574471ereport (FATAL ,
44584472(errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
44594473errmsg ("database files are incompatible with server" ),
4460- errdetail ("The database cluster was initialized with TOAST_MAX_CHUNK_SIZE %d,"
4461- " but the server was compiled with TOAST_MAX_CHUNK_SIZE %d." ,
4462- ControlFile -> toast_max_chunk_size , (int )TOAST_MAX_CHUNK_SIZE ),
4474+ /* translator: %s is a variable name and %d is its value */
4475+ errdetail ("The database cluster was initialized with %s %d,"
4476+ " but the server was compiled with %s %d." ,
4477+ "TOAST_MAX_CHUNK_SIZE" ,ControlFile -> toast_max_chunk_size ,
4478+ "TOAST_MAX_CHUNK_SIZE" , (int )TOAST_MAX_CHUNK_SIZE ),
44634479errhint ("It looks like you need to recompile or initdb." )));
44644480if (ControlFile -> loblksize != LOBLKSIZE )
44654481ereport (FATAL ,
44664482(errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
44674483errmsg ("database files are incompatible with server" ),
4468- errdetail ("The database cluster was initialized with LOBLKSIZE %d,"
4469- " but the server was compiled with LOBLKSIZE %d." ,
4470- ControlFile -> loblksize , (int )LOBLKSIZE ),
4484+ /* translator: %s is a variable name and %d is its value */
4485+ errdetail ("The database cluster was initialized with %s %d,"
4486+ " but the server was compiled with %s %d." ,
4487+ "LOBLKSIZE" ,ControlFile -> loblksize ,
4488+ "LOBLKSIZE" , (int )LOBLKSIZE ),
44714489errhint ("It looks like you need to recompile or initdb." )));
44724490
44734491#ifdef USE_FLOAT8_BYVAL
@@ -4505,11 +4523,15 @@ ReadControlFile(void)
45054523/* check and update variables dependent on wal_segment_size */
45064524if (ConvertToXSegs (min_wal_size_mb ,wal_segment_size )< 2 )
45074525ereport (ERROR , (errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
4508- errmsg ("\"min_wal_size\" must be at least twice \"wal_segment_size\"" )));
4526+ /* translator: both %s are GUC names */
4527+ errmsg ("\"%s\" must be at least twice \"%s\"" ,
4528+ "min_wal_size" ,"wal_segment_size" )));
45094529
45104530if (ConvertToXSegs (max_wal_size_mb ,wal_segment_size )< 2 )
45114531ereport (ERROR , (errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
4512- errmsg ("\"max_wal_size\" must be at least twice \"wal_segment_size\"" )));
4532+ /* translator: both %s are GUC names */
4533+ errmsg ("\"%s\" must be at least twice \"%s\"" ,
4534+ "max_wal_size" ,"wal_segment_size" )));
45134535
45144536UsableBytesInSegment =
45154537(wal_segment_size /XLOG_BLCKSZ * UsableBytesInPage )-