Skip to content

Commit fdf6800

Browse files
peterepull[bot]
authored andcommitted
Error message refactoring
Take some untranslatable things out of the message and replace by format placeholders, to reduce translatable strings and reduce translation mistakes.
1 parent 129a7c6 commit fdf6800

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/backend/replication/logical/launcher.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ logicalrep_worker_launch(Oid dbid, Oid subid, const char *subname, Oid userid,
422422
ereport(WARNING,
423423
(errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
424424
errmsg("out of logical replication worker slots"),
425-
errhint("You might need to increase max_logical_replication_workers.")));
425+
errhint("You might need to increase %s.", "max_logical_replication_workers")));
426426
return false;
427427
}
428428

@@ -496,7 +496,7 @@ logicalrep_worker_launch(Oid dbid, Oid subid, const char *subname, Oid userid,
496496
ereport(WARNING,
497497
(errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
498498
errmsg("out of background worker slots"),
499-
errhint("You might need to increase max_worker_processes.")));
499+
errhint("You might need to increase %s.", "max_worker_processes")));
500500
return false;
501501
}
502502

src/backend/replication/slot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1287,7 +1287,7 @@ ReportSlotInvalidation(ReplicationSlotInvalidationCause cause,
12871287
errmsg("invalidating obsolete replication slot \"%s\"",
12881288
NameStr(slotname)),
12891289
errdetail_internal("%s", err_detail.data),
1290-
hint ? errhint("You might need to increase max_slot_wal_keep_size.") : 0);
1290+
hint ? errhint("You might need to increase %s.", "max_slot_wal_keep_size") : 0);
12911291

12921292
pfree(err_detail.data);
12931293
}

src/backend/storage/lmgr/lock.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ LockAcquireExtended(const LOCKTAG *locktag,
980980
ereport(ERROR,
981981
(errcode(ERRCODE_OUT_OF_MEMORY),
982982
errmsg("out of shared memory"),
983-
errhint("You might need to increase max_locks_per_transaction.")));
983+
errhint("You might need to increase %s.", "max_locks_per_transaction")));
984984
else
985985
return LOCKACQUIRE_NOT_AVAIL;
986986
}
@@ -1018,7 +1018,7 @@ LockAcquireExtended(const LOCKTAG *locktag,
10181018
ereport(ERROR,
10191019
(errcode(ERRCODE_OUT_OF_MEMORY),
10201020
errmsg("out of shared memory"),
1021-
errhint("You might need to increase max_locks_per_transaction.")));
1021+
errhint("You might need to increase %s.", "max_locks_per_transaction")));
10221022
else
10231023
return LOCKACQUIRE_NOT_AVAIL;
10241024
}
@@ -2808,7 +2808,7 @@ FastPathGetRelationLockEntry(LOCALLOCK *locallock)
28082808
ereport(ERROR,
28092809
(errcode(ERRCODE_OUT_OF_MEMORY),
28102810
errmsg("out of shared memory"),
2811-
errhint("You might need to increase max_locks_per_transaction.")));
2811+
errhint("You might need to increase %s.", "max_locks_per_transaction")));
28122812
}
28132813
GrantLock(proclock->tag.myLock, proclock, lockmode);
28142814
FAST_PATH_CLEAR_LOCKMODE(MyProc, f, lockmode);
@@ -4193,7 +4193,7 @@ lock_twophase_recover(TransactionId xid, uint16 info,
41934193
ereport(ERROR,
41944194
(errcode(ERRCODE_OUT_OF_MEMORY),
41954195
errmsg("out of shared memory"),
4196-
errhint("You might need to increase max_locks_per_transaction.")));
4196+
errhint("You might need to increase %s.", "max_locks_per_transaction")));
41974197
}
41984198

41994199
/*
@@ -4258,7 +4258,7 @@ lock_twophase_recover(TransactionId xid, uint16 info,
42584258
ereport(ERROR,
42594259
(errcode(ERRCODE_OUT_OF_MEMORY),
42604260
errmsg("out of shared memory"),
4261-
errhint("You might need to increase max_locks_per_transaction.")));
4261+
errhint("You might need to increase %s.", "max_locks_per_transaction")));
42624262
}
42634263

42644264
/*
@@ -4608,7 +4608,7 @@ VirtualXactLock(VirtualTransactionId vxid, bool wait)
46084608
ereport(ERROR,
46094609
(errcode(ERRCODE_OUT_OF_MEMORY),
46104610
errmsg("out of shared memory"),
4611-
errhint("You might need to increase max_locks_per_transaction.")));
4611+
errhint("You might need to increase %s.", "max_locks_per_transaction")));
46124612
}
46134613
GrantLock(proclock->tag.myLock, proclock, ExclusiveLock);
46144614

src/backend/storage/lmgr/predicate.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2410,7 +2410,7 @@ CreatePredicateLock(const PREDICATELOCKTARGETTAG *targettag,
24102410
ereport(ERROR,
24112411
(errcode(ERRCODE_OUT_OF_MEMORY),
24122412
errmsg("out of shared memory"),
2413-
errhint("You might need to increase max_pred_locks_per_transaction.")));
2413+
errhint("You might need to increase %s.", "max_pred_locks_per_transaction")));
24142414
if (!found)
24152415
dlist_init(&target->predicateLocks);
24162416

@@ -2425,7 +2425,7 @@ CreatePredicateLock(const PREDICATELOCKTARGETTAG *targettag,
24252425
ereport(ERROR,
24262426
(errcode(ERRCODE_OUT_OF_MEMORY),
24272427
errmsg("out of shared memory"),
2428-
errhint("You might need to increase max_pred_locks_per_transaction.")));
2428+
errhint("You might need to increase %s.", "max_pred_locks_per_transaction")));
24292429

24302430
if (!found)
24312431
{
@@ -3822,7 +3822,7 @@ ReleaseOneSerializableXact(SERIALIZABLEXACT *sxact, bool partial,
38223822
ereport(ERROR,
38233823
(errcode(ERRCODE_OUT_OF_MEMORY),
38243824
errmsg("out of shared memory"),
3825-
errhint("You might need to increase max_pred_locks_per_transaction.")));
3825+
errhint("You might need to increase %s.", "max_pred_locks_per_transaction")));
38263826
if (found)
38273827
{
38283828
Assert(predlock->commitSeqNo != 0);

0 commit comments

Comments
 (0)