summaryrefslogtreecommitdiff
path: root/src/backend/storage/buffer/bufmgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/storage/buffer/bufmgr.c')
-rw-r--r--src/backend/storage/buffer/bufmgr.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index fd7e21d96d3..350cc0402aa 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -2769,7 +2769,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)));
@@ -6191,7 +6191,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);
@@ -6206,7 +6206,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,
@@ -7305,13 +7305,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;
}
@@ -7324,25 +7326,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