Skip to content

Commit d71e605

Browse files
committed
Fix lack of message pluralization
1 parent 3c09d11 commit d71e605

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/backend/replication/slot.c

+12-5
Original file line numberDiff line numberDiff line change
@@ -1263,11 +1263,18 @@ ReportSlotInvalidation(ReplicationSlotInvalidationCause cause,
12631263
switch (cause)
12641264
{
12651265
case RS_INVAL_WAL_REMOVED:
1266-
hint = true;
1267-
appendStringInfo(&err_detail, _("The slot's restart_lsn %X/%X exceeds the limit by %llu bytes."),
1268-
LSN_FORMAT_ARGS(restart_lsn),
1269-
(unsigned long long) (oldestLSN - restart_lsn));
1270-
break;
1266+
{
1267+
unsigned long long ex = oldestLSN - restart_lsn;
1268+
1269+
hint = true;
1270+
appendStringInfo(&err_detail,
1271+
ngettext("The slot's restart_lsn %X/%X exceeds the limit by %llu byte.",
1272+
"The slot's restart_lsn %X/%X exceeds the limit by %llu bytes.",
1273+
ex),
1274+
LSN_FORMAT_ARGS(restart_lsn),
1275+
ex);
1276+
break;
1277+
}
12711278
case RS_INVAL_HORIZON:
12721279
appendStringInfo(&err_detail, _("The slot conflicted with xid horizon %u."),
12731280
snapshotConflictHorizon);

0 commit comments

Comments
 (0)