#define XLOG_BLCKSZ_K (XLOG_BLCKSZ / 1024)
#define LABEL_FORMAT " %-30s"
-#define NA_FORMAT "%20s"
-#define OPS_FORMAT "%13.3f ops/sec %6.0f usecs/op"
+#define NA_FORMAT "%21s\n"
+/* translator: maintain alignment with NA_FORMAT */
+#define OPS_FORMAT gettext_noop("%13.3f ops/sec %6.0f usecs/op\n")
#define USECS_SEC 1000000
/* These are macros to avoid timing the function call overhead. */
if (CreateThread(NULL, 0, process_alarm, NULL, 0, NULL) == \
INVALID_HANDLE_VALUE) \
{ \
- fprintf(stderr, _("Cannot create thread for alarm\n")); \
+ fprintf(stderr, _("Could not create thread for alarm\n")); \
exit(1); \
} \
gettimeofday(&start_t, NULL); \
exit(1);
}
- printf(_("%d seconds per test\n"), secs_per_test);
+ printf(ngettext("%d second per test\n",
+ "%d seconds per test\n",
+ secs_per_test),
+ secs_per_test);
#if PG_O_DIRECT != 0
printf(_("O_DIRECT supported on this platform for open_datasync and open_sync.\n"));
#else
#ifdef OPEN_DATASYNC_FLAG
if ((tmpfile = open(filename, O_RDWR | O_DSYNC | PG_O_DIRECT, 0)) == -1)
{
- printf(NA_FORMAT, _("n/a*\n"));
+ printf(NA_FORMAT, _("n/a*"));
fs_warning = true;
}
else
close(tmpfile);
}
#else
- printf(NA_FORMAT, _("n/a\n"));
+ printf(NA_FORMAT, _("n/a"));
#endif
/*
STOP_TIMER;
close(tmpfile);
#else
- printf(NA_FORMAT, _("n/a\n"));
+ printf(NA_FORMAT, _("n/a"));
#endif
/*
STOP_TIMER;
close(tmpfile);
#else
- printf(NA_FORMAT, _("n/a\n"));
+ printf(NA_FORMAT, _("n/a"));
#endif
/*
#ifdef OPEN_SYNC_FLAG
if ((tmpfile = open(filename, O_RDWR | OPEN_SYNC_FLAG | PG_O_DIRECT, 0)) == -1)
{
- printf(NA_FORMAT, _("n/a*\n"));
+ printf(NA_FORMAT, _("n/a*"));
fs_warning = true;
}
else
close(tmpfile);
}
#else
- printf(NA_FORMAT, _("n/a\n"));
+ printf(NA_FORMAT, _("n/a"));
#endif
if (fs_warning)
#ifdef OPEN_SYNC_FLAG
if ((tmpfile = open(filename, O_RDWR | OPEN_SYNC_FLAG | PG_O_DIRECT, 0)) == -1)
- printf(NA_FORMAT, _("n/a*\n"));
+ printf(NA_FORMAT, _("n/a*"));
else
{
START_TIMER;
close(tmpfile);
}
#else
- printf(NA_FORMAT, _("n/a\n"));
+ printf(NA_FORMAT, _("n/a"));
#endif
}
double per_second = ops / total_time;
double avg_op_time_us = (total_time / ops) * USECS_SEC;
- printf(OPS_FORMAT "\n", per_second, avg_op_time_us);
+ printf(_(OPS_FORMAT), per_second, avg_op_time_us);
}
#ifndef WIN32
XLogFileName(fname, timeline_id, sendSegNo);
- fatal_error("could not seek in log segment %s to offset %u: %s",
+ fatal_error("could not seek in log file %s to offset %u: %s",
fname, startoff, strerror(err));
}
sendOff = startoff;
XLogFileName(fname, timeline_id, sendSegNo);
- fatal_error("could not read from log segment %s, offset %d, length %d: %s",
+ fatal_error("could not read from log file %s, offset %u, length %d: %s",
fname, sendOff, segbytes, strerror(err));
}
printf(_(" -n, --limit=N number of records to display\n"));
printf(_(" -p, --path=PATH directory in which to find log segment files or a\n"
" directory with a ./pg_wal that contains such files\n"
- " (default: current directory, ./pg_wal, PGDATA/pg_wal)\n"));
- printf(_(" -r, --rmgr=RMGR only show records generated by resource manager RMGR\n"
+ " (default: current directory, ./pg_wal, $PGDATA/pg_wal)\n"));
+ printf(_(" -r, --rmgr=RMGR only show records generated by resource manager RMGR;\n"
" use --rmgr=list to list valid resource manager names\n"));
printf(_(" -s, --start=RECPTR start reading at WAL location RECPTR\n"));
printf(_(" -t, --timeline=TLI timeline from which to read log records\n"
" (default: 1 or the value used in STARTSEG)\n"));
printf(_(" -V, --version output version information, then exit\n"));
- printf(_(" -x, --xid=XID only show records with TransactionId XID\n"));
+ printf(_(" -x, --xid=XID only show records with transaction ID XID\n"));
printf(_(" -z, --stats[=record] show statistics instead of records\n"
" (optionally, show per-record statistics)\n"));
printf(_(" -?, --help show this help, then exit\n"));
case 'x':
if (sscanf(optarg, "%u", &config.filter_by_xid) != 1)
{
- fprintf(stderr, _("%s: could not parse \"%s\" as a valid xid\n"),
+ fprintf(stderr, _("%s: could not parse \"%s\" as a transaction ID\n"),
progname, optarg);
goto bad_argument;
}
if (!verify_directory(private.inpath))
{
fprintf(stderr,
- _("%s: path \"%s\" cannot be opened: %s\n"),
+ _("%s: path \"%s\" could not be opened: %s\n"),
progname, private.inpath, strerror(errno));
goto bad_argument;
}
private.inpath = directory;
if (!verify_directory(private.inpath))
- fatal_error("cannot open directory \"%s\": %s",
+ fatal_error("could not open directory \"%s\": %s",
private.inpath, strerror(errno));
}
* a segment (e.g. we were used in file mode).
*/
if (first_record != private.startptr && (private.startptr % XLogSegSize) != 0)
- printf(_("first record is after %X/%X, at %X/%X, skipping over %u bytes\n"),
+ printf(ngettext("first record is after %X/%X, at %X/%X, skipping over %u byte\n",
+ "first record is after %X/%X, at %X/%X, skipping over %u bytes\n",
+ (first_record - private.startptr)),
(uint32) (private.startptr >> 32), (uint32) private.startptr,
(uint32) (first_record >> 32), (uint32) first_record,
(uint32) (first_record - private.startptr));