1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-21 05:21:08 +03:00

Message style improvements

Mostly adding some quoting.
This commit is contained in:
Peter Eisentraut
2025-08-26 22:48:00 +02:00
parent 6b34e21575
commit 952b5a4a95
4 changed files with 42 additions and 40 deletions

View File

@@ -377,7 +377,7 @@ pgaio_uring_shmem_init(bool first_time)
else if (-ret == ENOSYS)
{
err = ERRCODE_FEATURE_NOT_SUPPORTED;
hint = _("Kernel does not support io_uring.");
hint = _("The kernel does not support io_uring.");
}
/* update errno to allow %m to work */

View File

@@ -2771,7 +2771,7 @@ ExtendBufferedRelShared(BufferManagerRelation bmr,
if (valid && !PageIsNew((Page) buf_block))
ereport(ERROR,
(errmsg("unexpected data beyond EOF in block %u of relation %s",
(errmsg("unexpected data beyond EOF in block %u of relation \"%s\"",
existing_hdr->tag.blockNum,
relpath(bmr.smgr->smgr_rlocator, fork).str),
errhint("This has been seen to occur with buggy kernels; consider updating your system.")));
@@ -6196,7 +6196,7 @@ shared_buffer_write_error_callback(void *arg)
/* Buffer is pinned, so we can read the tag without locking the spinlock */
if (bufHdr != NULL)
errcontext("writing block %u of relation %s",
errcontext("writing block %u of relation \"%s\"",
bufHdr->tag.blockNum,
relpathperm(BufTagGetRelFileLocator(&bufHdr->tag),
BufTagGetForkNum(&bufHdr->tag)).str);
@@ -6211,7 +6211,7 @@ local_buffer_write_error_callback(void *arg)
BufferDesc *bufHdr = (BufferDesc *) arg;
if (bufHdr != NULL)
errcontext("writing block %u of relation %s",
errcontext("writing block %u of relation \"%s\"",
bufHdr->tag.blockNum,
relpathbackend(BufTagGetRelFileLocator(&bufHdr->tag),
MyProcNumber,
@@ -7310,13 +7310,15 @@ buffer_readv_report(PgAioResult result, const PgAioTargetData *td,
ereport(elevel,
errcode(ERRCODE_DATA_CORRUPTED),
errmsg("zeroing %u page(s) and ignoring %u checksum failure(s) among blocks %u..%u of relation %s",
errmsg("zeroing %u page(s) and ignoring %u checksum failure(s) among blocks %u..%u of relation \"%s\"",
affected_count, checkfail_count, first, last, rpath.str),
affected_count > 1 ?
errdetail("Block %u held first zeroed page.",
errdetail("Block %u held the first zeroed page.",
first + first_off) : 0,
errhint("See server log for details about the other %d invalid block(s).",
affected_count + checkfail_count - 1));
errhint_plural("See server log for details about the other %d invalid block.",
"See server log for details about the other %d invalid blocks.",
affected_count + checkfail_count - 1,
affected_count + checkfail_count - 1));
return;
}
@@ -7329,25 +7331,25 @@ buffer_readv_report(PgAioResult result, const PgAioTargetData *td,
{
Assert(!zeroed_any); /* can't have invalid pages when zeroing them */
affected_count = zeroed_or_error_count;
msg_one = _("invalid page in block %u of relation %s");
msg_mult = _("%u invalid pages among blocks %u..%u of relation %s");
det_mult = _("Block %u held first invalid page.");
msg_one = _("invalid page in block %u of relation \"%s\"");
msg_mult = _("%u invalid pages among blocks %u..%u of relation \"%s\"");
det_mult = _("Block %u held the first invalid page.");
hint_mult = _("See server log for the other %u invalid block(s).");
}
else if (zeroed_any && !ignored_any)
{
affected_count = zeroed_or_error_count;
msg_one = _("invalid page in block %u of relation %s; zeroing out page");
msg_mult = _("zeroing out %u invalid pages among blocks %u..%u of relation %s");
det_mult = _("Block %u held first zeroed page.");
msg_one = _("invalid page in block %u of relation \"%s\"; zeroing out page");
msg_mult = _("zeroing out %u invalid pages among blocks %u..%u of relation \"%s\"");
det_mult = _("Block %u held the first zeroed page.");
hint_mult = _("See server log for the other %u zeroed block(s).");
}
else if (!zeroed_any && ignored_any)
{
affected_count = checkfail_count;
msg_one = _("ignoring checksum failure in block %u of relation %s");
msg_mult = _("ignoring %u checksum failures among blocks %u..%u of relation %s");
det_mult = _("Block %u held first ignored page.");
msg_one = _("ignoring checksum failure in block %u of relation \"%s\"");
msg_mult = _("ignoring %u checksum failures among blocks %u..%u of relation \"%s\"");
det_mult = _("Block %u held the first ignored page.");
hint_mult = _("See server log for the other %u ignored block(s).");
}
else