@@ -4395,17 +4395,21 @@ ReadControlFile(void)
43954395 ereport (FATAL ,
43964396 (errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
43974397 errmsg ("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 ),
44014403 errhint ("It looks like you need to initdb." )));
44024404 if (ControlFile -> maxAlign != MAXIMUM_ALIGNOF )
44034405 ereport (FATAL ,
44044406 (errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
44054407 errmsg ("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 ),
44094413 errhint ("It looks like you need to initdb." )));
44104414 if (ControlFile -> floatFormat != FLOATFORMAT_VALUE )
44114415 ereport (FATAL ,
@@ -4417,57 +4421,71 @@ ReadControlFile(void)
44174421 ereport (FATAL ,
44184422 (errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
44194423 errmsg ("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 ),
44234429 errhint ("It looks like you need to recompile or initdb." )));
44244430 if (ControlFile -> relseg_size != RELSEG_SIZE )
44254431 ereport (FATAL ,
44264432 (errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
44274433 errmsg ("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 ),
44314439 errhint ("It looks like you need to recompile or initdb." )));
44324440 if (ControlFile -> xlog_blcksz != XLOG_BLCKSZ )
44334441 ereport (FATAL ,
44344442 (errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
44354443 errmsg ("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 ),
44394449 errhint ("It looks like you need to recompile or initdb." )));
44404450 if (ControlFile -> nameDataLen != NAMEDATALEN )
44414451 ereport (FATAL ,
44424452 (errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
44434453 errmsg ("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 ),
44474459 errhint ("It looks like you need to recompile or initdb." )));
44484460 if (ControlFile -> indexMaxKeys != INDEX_MAX_KEYS )
44494461 ereport (FATAL ,
44504462 (errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
44514463 errmsg ("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 ),
44554469 errhint ("It looks like you need to recompile or initdb." )));
44564470 if (ControlFile -> toast_max_chunk_size != TOAST_MAX_CHUNK_SIZE )
44574471 ereport (FATAL ,
44584472 (errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
44594473 errmsg ("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 ),
44634479 errhint ("It looks like you need to recompile or initdb." )));
44644480 if (ControlFile -> loblksize != LOBLKSIZE )
44654481 ereport (FATAL ,
44664482 (errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
44674483 errmsg ("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 ),
44714489 errhint ("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 */
45064524 if (ConvertToXSegs (min_wal_size_mb , wal_segment_size ) < 2 )
45074525 ereport (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
45104530 if (ConvertToXSegs (max_wal_size_mb , wal_segment_size ) < 2 )
45114531 ereport (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
45144536 UsableBytesInSegment =
45154537 (wal_segment_size / XLOG_BLCKSZ * UsableBytesInPage ) -
0 commit comments