Fix lack of message pluralization

This commit is contained in:
Peter Eisentraut 2023-08-24 14:22:02 +02:00
parent 3c09d11594
commit d71e6055e4
1 changed files with 12 additions and 5 deletions

View File

@ -1263,11 +1263,18 @@ ReportSlotInvalidation(ReplicationSlotInvalidationCause cause,
switch (cause)
{
case RS_INVAL_WAL_REMOVED:
hint = true;
appendStringInfo(&err_detail, _("The slot's restart_lsn %X/%X exceeds the limit by %llu bytes."),
LSN_FORMAT_ARGS(restart_lsn),
(unsigned long long) (oldestLSN - restart_lsn));
break;
{
unsigned long long ex = oldestLSN - restart_lsn;
hint = true;
appendStringInfo(&err_detail,
ngettext("The slot's restart_lsn %X/%X exceeds the limit by %llu byte.",
"The slot's restart_lsn %X/%X exceeds the limit by %llu bytes.",
ex),
LSN_FORMAT_ARGS(restart_lsn),
ex);
break;
}
case RS_INVAL_HORIZON:
appendStringInfo(&err_detail, _("The slot conflicted with xid horizon %u."),
snapshotConflictHorizon);