@@ -4395,17 +4395,21 @@ ReadControlFile(void)
4395
4395
ereport (FATAL ,
4396
4396
(errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
4397
4397
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 ),
4401
4403
errhint ("It looks like you need to initdb." )));
4402
4404
if (ControlFile -> maxAlign != MAXIMUM_ALIGNOF )
4403
4405
ereport (FATAL ,
4404
4406
(errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
4405
4407
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 ),
4409
4413
errhint ("It looks like you need to initdb." )));
4410
4414
if (ControlFile -> floatFormat != FLOATFORMAT_VALUE )
4411
4415
ereport (FATAL ,
@@ -4417,57 +4421,71 @@ ReadControlFile(void)
4417
4421
ereport (FATAL ,
4418
4422
(errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
4419
4423
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 ),
4423
4429
errhint ("It looks like you need to recompile or initdb." )));
4424
4430
if (ControlFile -> relseg_size != RELSEG_SIZE )
4425
4431
ereport (FATAL ,
4426
4432
(errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
4427
4433
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 ),
4431
4439
errhint ("It looks like you need to recompile or initdb." )));
4432
4440
if (ControlFile -> xlog_blcksz != XLOG_BLCKSZ )
4433
4441
ereport (FATAL ,
4434
4442
(errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
4435
4443
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 ),
4439
4449
errhint ("It looks like you need to recompile or initdb." )));
4440
4450
if (ControlFile -> nameDataLen != NAMEDATALEN )
4441
4451
ereport (FATAL ,
4442
4452
(errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
4443
4453
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 ),
4447
4459
errhint ("It looks like you need to recompile or initdb." )));
4448
4460
if (ControlFile -> indexMaxKeys != INDEX_MAX_KEYS )
4449
4461
ereport (FATAL ,
4450
4462
(errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
4451
4463
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 ),
4455
4469
errhint ("It looks like you need to recompile or initdb." )));
4456
4470
if (ControlFile -> toast_max_chunk_size != TOAST_MAX_CHUNK_SIZE )
4457
4471
ereport (FATAL ,
4458
4472
(errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
4459
4473
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 ),
4463
4479
errhint ("It looks like you need to recompile or initdb." )));
4464
4480
if (ControlFile -> loblksize != LOBLKSIZE )
4465
4481
ereport (FATAL ,
4466
4482
(errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
4467
4483
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 ),
4471
4489
errhint ("It looks like you need to recompile or initdb." )));
4472
4490
4473
4491
#ifdef USE_FLOAT8_BYVAL
@@ -4505,11 +4523,15 @@ ReadControlFile(void)
4505
4523
/* check and update variables dependent on wal_segment_size */
4506
4524
if (ConvertToXSegs (min_wal_size_mb , wal_segment_size ) < 2 )
4507
4525
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" )));
4509
4529
4510
4530
if (ConvertToXSegs (max_wal_size_mb , wal_segment_size ) < 2 )
4511
4531
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" )));
4513
4535
4514
4536
UsableBytesInSegment =
4515
4537
(wal_segment_size / XLOG_BLCKSZ * UsableBytesInPage ) -
0 commit comments