Fix lack of message pluralization
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 24 Aug 2023 12:22:02 +0000 (14:22 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 24 Aug 2023 12:22:46 +0000 (14:22 +0200)
src/backend/replication/slot.c

index 1dc27264f61ee97220dcdd830a6bca00394340a2..bb09c4010f8f4bda9702b976d6241a69823546aa 100644 (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);