mirror of
https://github.com/postgres/postgres.git
synced 2025-06-05 23:56:58 +03:00
Error message refactoring
Take some untranslatable things out of the message and replace by format placeholders, to reduce translatable strings and reduce translation mistakes.
This commit is contained in:
parent
b63cda34e2
commit
3ad5f07c0f
@ -422,7 +422,7 @@ retry:
|
|||||||
ereport(WARNING,
|
ereport(WARNING,
|
||||||
(errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
|
(errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
|
||||||
errmsg("out of logical replication worker slots"),
|
errmsg("out of logical replication worker slots"),
|
||||||
errhint("You might need to increase max_logical_replication_workers.")));
|
errhint("You might need to increase %s.", "max_logical_replication_workers")));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -496,7 +496,7 @@ retry:
|
|||||||
ereport(WARNING,
|
ereport(WARNING,
|
||||||
(errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
|
(errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
|
||||||
errmsg("out of background worker slots"),
|
errmsg("out of background worker slots"),
|
||||||
errhint("You might need to increase max_worker_processes.")));
|
errhint("You might need to increase %s.", "max_worker_processes")));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1287,7 +1287,7 @@ ReportSlotInvalidation(ReplicationSlotInvalidationCause cause,
|
|||||||
errmsg("invalidating obsolete replication slot \"%s\"",
|
errmsg("invalidating obsolete replication slot \"%s\"",
|
||||||
NameStr(slotname)),
|
NameStr(slotname)),
|
||||||
errdetail_internal("%s", err_detail.data),
|
errdetail_internal("%s", err_detail.data),
|
||||||
hint ? errhint("You might need to increase max_slot_wal_keep_size.") : 0);
|
hint ? errhint("You might need to increase %s.", "max_slot_wal_keep_size") : 0);
|
||||||
|
|
||||||
pfree(err_detail.data);
|
pfree(err_detail.data);
|
||||||
}
|
}
|
||||||
|
@ -980,7 +980,7 @@ LockAcquireExtended(const LOCKTAG *locktag,
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||||
errmsg("out of shared memory"),
|
errmsg("out of shared memory"),
|
||||||
errhint("You might need to increase max_locks_per_transaction.")));
|
errhint("You might need to increase %s.", "max_locks_per_transaction")));
|
||||||
else
|
else
|
||||||
return LOCKACQUIRE_NOT_AVAIL;
|
return LOCKACQUIRE_NOT_AVAIL;
|
||||||
}
|
}
|
||||||
@ -1018,7 +1018,7 @@ LockAcquireExtended(const LOCKTAG *locktag,
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||||
errmsg("out of shared memory"),
|
errmsg("out of shared memory"),
|
||||||
errhint("You might need to increase max_locks_per_transaction.")));
|
errhint("You might need to increase %s.", "max_locks_per_transaction")));
|
||||||
else
|
else
|
||||||
return LOCKACQUIRE_NOT_AVAIL;
|
return LOCKACQUIRE_NOT_AVAIL;
|
||||||
}
|
}
|
||||||
@ -2808,7 +2808,7 @@ FastPathGetRelationLockEntry(LOCALLOCK *locallock)
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||||
errmsg("out of shared memory"),
|
errmsg("out of shared memory"),
|
||||||
errhint("You might need to increase max_locks_per_transaction.")));
|
errhint("You might need to increase %s.", "max_locks_per_transaction")));
|
||||||
}
|
}
|
||||||
GrantLock(proclock->tag.myLock, proclock, lockmode);
|
GrantLock(proclock->tag.myLock, proclock, lockmode);
|
||||||
FAST_PATH_CLEAR_LOCKMODE(MyProc, f, lockmode);
|
FAST_PATH_CLEAR_LOCKMODE(MyProc, f, lockmode);
|
||||||
@ -4193,7 +4193,7 @@ lock_twophase_recover(TransactionId xid, uint16 info,
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||||
errmsg("out of shared memory"),
|
errmsg("out of shared memory"),
|
||||||
errhint("You might need to increase max_locks_per_transaction.")));
|
errhint("You might need to increase %s.", "max_locks_per_transaction")));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -4258,7 +4258,7 @@ lock_twophase_recover(TransactionId xid, uint16 info,
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||||
errmsg("out of shared memory"),
|
errmsg("out of shared memory"),
|
||||||
errhint("You might need to increase max_locks_per_transaction.")));
|
errhint("You might need to increase %s.", "max_locks_per_transaction")));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -4608,7 +4608,7 @@ VirtualXactLock(VirtualTransactionId vxid, bool wait)
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||||
errmsg("out of shared memory"),
|
errmsg("out of shared memory"),
|
||||||
errhint("You might need to increase max_locks_per_transaction.")));
|
errhint("You might need to increase %s.", "max_locks_per_transaction")));
|
||||||
}
|
}
|
||||||
GrantLock(proclock->tag.myLock, proclock, ExclusiveLock);
|
GrantLock(proclock->tag.myLock, proclock, ExclusiveLock);
|
||||||
|
|
||||||
|
@ -2410,7 +2410,7 @@ CreatePredicateLock(const PREDICATELOCKTARGETTAG *targettag,
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||||
errmsg("out of shared memory"),
|
errmsg("out of shared memory"),
|
||||||
errhint("You might need to increase max_pred_locks_per_transaction.")));
|
errhint("You might need to increase %s.", "max_pred_locks_per_transaction")));
|
||||||
if (!found)
|
if (!found)
|
||||||
dlist_init(&target->predicateLocks);
|
dlist_init(&target->predicateLocks);
|
||||||
|
|
||||||
@ -2425,7 +2425,7 @@ CreatePredicateLock(const PREDICATELOCKTARGETTAG *targettag,
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||||
errmsg("out of shared memory"),
|
errmsg("out of shared memory"),
|
||||||
errhint("You might need to increase max_pred_locks_per_transaction.")));
|
errhint("You might need to increase %s.", "max_pred_locks_per_transaction")));
|
||||||
|
|
||||||
if (!found)
|
if (!found)
|
||||||
{
|
{
|
||||||
@ -3822,7 +3822,7 @@ ReleaseOneSerializableXact(SERIALIZABLEXACT *sxact, bool partial,
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||||
errmsg("out of shared memory"),
|
errmsg("out of shared memory"),
|
||||||
errhint("You might need to increase max_pred_locks_per_transaction.")));
|
errhint("You might need to increase %s.", "max_pred_locks_per_transaction")));
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
Assert(predlock->commitSeqNo != 0);
|
Assert(predlock->commitSeqNo != 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user