Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit952b5a4

Browse files
committed
Message style improvements
Mostly adding some quoting.
1 parent6b34e21 commit952b5a4

File tree

4 files changed

+42
-40
lines changed

4 files changed

+42
-40
lines changed

‎src/backend/catalog/storage.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ RelationCopyStorage(SMgrRelation src, SMgrRelation dst,
546546

547547
ereport(ERROR,
548548
(errcode(ERRCODE_DATA_CORRUPTED),
549-
errmsg("invalid page in block %u of relation%s",
549+
errmsg("invalid page in block %u of relation\"%s\"",
550550
blkno,relpath.str)));
551551
}
552552

‎src/backend/storage/aio/method_io_uring.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ pgaio_uring_shmem_init(bool first_time)
377377
elseif (-ret==ENOSYS)
378378
{
379379
err=ERRCODE_FEATURE_NOT_SUPPORTED;
380-
hint=_("Kernel does not support io_uring.");
380+
hint=_("The kernel does not support io_uring.");
381381
}
382382

383383
/* update errno to allow %m to work */

‎src/backend/storage/buffer/bufmgr.c‎

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2771,7 +2771,7 @@ ExtendBufferedRelShared(BufferManagerRelation bmr,
27712771

27722772
if (valid&& !PageIsNew((Page)buf_block))
27732773
ereport(ERROR,
2774-
(errmsg("unexpected data beyond EOF in block %u of relation%s",
2774+
(errmsg("unexpected data beyond EOF in block %u of relation\"%s\"",
27752775
existing_hdr->tag.blockNum,
27762776
relpath(bmr.smgr->smgr_rlocator,fork).str),
27772777
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)
61966196

61976197
/* Buffer is pinned, so we can read the tag without locking the spinlock */
61986198
if (bufHdr!=NULL)
6199-
errcontext("writing block %u of relation%s",
6199+
errcontext("writing block %u of relation\"%s\"",
62006200
bufHdr->tag.blockNum,
62016201
relpathperm(BufTagGetRelFileLocator(&bufHdr->tag),
62026202
BufTagGetForkNum(&bufHdr->tag)).str);
@@ -6211,7 +6211,7 @@ local_buffer_write_error_callback(void *arg)
62116211
BufferDesc*bufHdr= (BufferDesc*)arg;
62126212

62136213
if (bufHdr!=NULL)
6214-
errcontext("writing block %u of relation%s",
6214+
errcontext("writing block %u of relation\"%s\"",
62156215
bufHdr->tag.blockNum,
62166216
relpathbackend(BufTagGetRelFileLocator(&bufHdr->tag),
62176217
MyProcNumber,
@@ -7310,13 +7310,15 @@ buffer_readv_report(PgAioResult result, const PgAioTargetData *td,
73107310

73117311
ereport(elevel,
73127312
errcode(ERRCODE_DATA_CORRUPTED),
7313-
errmsg("zeroing %u page(s) and ignoring %u checksum failure(s) among blocks %u..%u of relation%s",
7313+
errmsg("zeroing %u page(s) and ignoring %u checksum failure(s) among blocks %u..%u of relation\"%s\"",
73147314
affected_count,checkfail_count,first,last,rpath.str),
73157315
affected_count>1 ?
7316-
errdetail("Block %u held first zeroed page.",
7316+
errdetail("Block %u heldthefirst zeroed page.",
73177317
first+first_off) :0,
7318-
errhint("See server log for details about the other %d invalid block(s).",
7319-
affected_count+checkfail_count-1));
7318+
errhint_plural("See server log for details about the other %d invalid block.",
7319+
"See server log for details about the other %d invalid blocks.",
7320+
affected_count+checkfail_count-1,
7321+
affected_count+checkfail_count-1));
73207322
return;
73217323
}
73227324

@@ -7329,25 +7331,25 @@ buffer_readv_report(PgAioResult result, const PgAioTargetData *td,
73297331
{
73307332
Assert(!zeroed_any);/* can't have invalid pages when zeroing them */
73317333
affected_count=zeroed_or_error_count;
7332-
msg_one=_("invalid page in block %u of relation%s");
7333-
msg_mult=_("%u invalid pages among blocks %u..%u of relation%s");
7334-
det_mult=_("Block %u held first invalid page.");
7334+
msg_one=_("invalid page in block %u of relation\"%s\"");
7335+
msg_mult=_("%u invalid pages among blocks %u..%u of relation\"%s\"");
7336+
det_mult=_("Block %u heldthefirst invalid page.");
73357337
hint_mult=_("See server log for the other %u invalid block(s).");
73367338
}
73377339
elseif (zeroed_any&& !ignored_any)
73387340
{
73397341
affected_count=zeroed_or_error_count;
7340-
msg_one=_("invalid page in block %u of relation%s; zeroing out page");
7341-
msg_mult=_("zeroing out %u invalid pages among blocks %u..%u of relation%s");
7342-
det_mult=_("Block %u held first zeroed page.");
7342+
msg_one=_("invalid page in block %u of relation\"%s\"; zeroing out page");
7343+
msg_mult=_("zeroing out %u invalid pages among blocks %u..%u of relation\"%s\"");
7344+
det_mult=_("Block %u heldthefirst zeroed page.");
73437345
hint_mult=_("See server log for the other %u zeroed block(s).");
73447346
}
73457347
elseif (!zeroed_any&&ignored_any)
73467348
{
73477349
affected_count=checkfail_count;
7348-
msg_one=_("ignoring checksum failure in block %u of relation%s");
7349-
msg_mult=_("ignoring %u checksum failures among blocks %u..%u of relation%s");
7350-
det_mult=_("Block %u held first ignored page.");
7350+
msg_one=_("ignoring checksum failure in block %u of relation\"%s\"");
7351+
msg_mult=_("ignoring %u checksum failures among blocks %u..%u of relation\"%s\"");
7352+
det_mult=_("Block %u heldthefirst ignored page.");
73517353
hint_mult=_("See server log for the other %u ignored block(s).");
73527354
}
73537355
else

‎src/test/modules/test_aio/t/001_aio.pl‎

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,8 @@ sub test_io_error
396396
{
397397
my$invalid_page_re =
398398
$tblnameeq'tbl_corr'
399-
?qr/invalid page in block 1 of relation base\/\d+\/\d+/
400-
:qr/invalid page in block 1 of relation base\/\d+\/t\d+_\d+/;
399+
?qr/invalid page in block 1 of relation"base\/\d+\/\d+/
400+
:qr/invalid page in block 1 of relation"base\/\d+\/t\d+_\d+/;
401401

402402
# verify the error is reported in custom C code
403403
psql_like(
@@ -798,7 +798,7 @@ sub test_inject
798798
"shortened multi-block read detects invalid page",
799799
qq(SELECT count(*) FROM tbl_corr WHERE ctid < '(2, 1)'),
800800
qr/^$/,
801-
qr/ERROR:.*invalid page in block 1 of relation base\/.*/);
801+
qr/ERROR:.*invalid page in block 1 of relation"base\/.*/);
802802

803803
# trigger a hard error, should error out
804804
$psql->query_safe(
@@ -985,7 +985,7 @@ sub test_zero
985985
qq(
986986
SELECT read_rel_block_ll('tbl_zero', 0, zero_on_error=>false)),
987987
qr/^$/,
988-
qr/^psql:<stdin>:\d+: ERROR: invalid page in block 0 of relation base\/.*\/.*$/
988+
qr/^psql:<stdin>:\d+: ERROR: invalid page in block 0 of relation"base\/.*\/.*$/
989989
);
990990

991991
# Check that page validity errors are zeroed
@@ -996,7 +996,7 @@ sub test_zero
996996
qq(
997997
SELECT read_rel_block_ll('tbl_zero', 0, zero_on_error=>true)),
998998
qr/^$/,
999-
qr/^psql:<stdin>:\d+: WARNING: invalid page in block 0 of relation base\/.*\/.*; zeroing out page$/
999+
qr/^psql:<stdin>:\d+: WARNING: invalid page in block 0 of relation"base\/.*\/.*"; zeroing out page$/
10001000
);
10011001

10021002
# And that once the corruption is fixed, we can read again
@@ -1027,7 +1027,7 @@ sub test_zero
10271027
"$persistency: test zeroing of invalid block 3",
10281028
qq(SELECT read_rel_block_ll('tbl_zero', 3, zero_on_error=>true);),
10291029
qr/^$/,
1030-
qr/^psql:<stdin>:\d+: WARNING: invalid page in block 3 of relation base\/.*\/.*; zeroing out page$/
1030+
qr/^psql:<stdin>:\d+: WARNING: invalid page in block 3 of relation"base\/.*\/.*"; zeroing out page$/
10311031
);
10321032

10331033

@@ -1044,7 +1044,7 @@ sub test_zero
10441044
"$persistency: test reading of invalid block 2,3 in larger read",
10451045
qq(SELECT read_rel_block_ll('tbl_zero', 1, nblocks=>4, zero_on_error=>false)),
10461046
qr/^$/,
1047-
qr/^psql:<stdin>:\d+: ERROR: 2 invalid pages among blocks 1..4 of relation base\/.*\/.*\nDETAIL: Block 2 held first invalid page\.\nHINT:[^\n]+$/
1047+
qr/^psql:<stdin>:\d+: ERROR: 2 invalid pages among blocks 1..4 of relation"base\/.*\/.*\nDETAIL: Block 2 held the first invalid page\.\nHINT:[^\n]+$/
10481048
);
10491049

10501050
# Then test zeroing via ZERO_ON_ERROR flag
@@ -1054,7 +1054,7 @@ sub test_zero
10541054
"$persistency: test zeroing of invalid block 2,3 in larger read, ZERO_ON_ERROR",
10551055
qq(SELECT read_rel_block_ll('tbl_zero', 1, nblocks=>4, zero_on_error=>true)),
10561056
qr/^$/,
1057-
qr/^psql:<stdin>:\d+: WARNING: zeroing out 2 invalid pages among blocks 1..4 of relation base\/.*\/.*\nDETAIL: Block 2 held first zeroed page\.\nHINT:[^\n]+$/
1057+
qr/^psql:<stdin>:\d+: WARNING: zeroing out 2 invalid pages among blocks 1..4 of relation"base\/.*\/.*\nDETAIL: Block 2 held the first zeroed page\.\nHINT:[^\n]+$/
10581058
);
10591059

10601060
# Then test zeroing via zero_damaged_pages
@@ -1069,7 +1069,7 @@ sub test_zero
10691069
COMMIT;
10701070
),
10711071
qr/^$/,
1072-
qr/^psql:<stdin>:\d+: WARNING: zeroing out 2 invalid pages among blocks 1..4 of relation base\/.*\/.*\nDETAIL: Block 2 held first zeroed page\.\nHINT:[^\n]+$/
1072+
qr/^psql:<stdin>:\d+: WARNING: zeroing out 2 invalid pages among blocks 1..4 of relation"base\/.*\/.*\nDETAIL: Block 2 held the first zeroed page\.\nHINT:[^\n]+$/
10731073
);
10741074

10751075
$psql_a->query_safe(qq(COMMIT));
@@ -1091,7 +1091,7 @@ sub test_zero
10911091
qq(
10921092
SELECT count(*) FROM tbl_zero),
10931093
qr/^$/,
1094-
qr/^psql:<stdin>:\d+: ERROR: invalid page in block 2 of relation base\/.*\/.*$/
1094+
qr/^psql:<stdin>:\d+: ERROR: invalid page in block 2 of relation"base\/.*\/.*$/
10951095
);
10961096

10971097
# Verify that bufmgr.c IO zeroes out pages with page validity errors
@@ -1106,7 +1106,7 @@ sub test_zero
11061106
COMMIT;
11071107
),
11081108
qr/^\d+$/,
1109-
qr/^psql:<stdin>:\d+: WARNING: invalid page in block 2 of relation base\/.*\/.*$/
1109+
qr/^psql:<stdin>:\d+: WARNING: invalid page in block 2 of relation"base\/.*\/.*$/
11101110
);
11111111

11121112
# Check that warnings/errors about page validity in an IO started by
@@ -1192,7 +1192,7 @@ sub test_checksum
11921192
qq(
11931193
SELECT read_rel_block_ll('tbl_normal', 3, nblocks=>1, zero_on_error=>false);),
11941194
qr/^$/,
1195-
qr/^psql:<stdin>:\d+: ERROR: invalid page in block 3 of relation base\/\d+\/\d+$/
1195+
qr/^psql:<stdin>:\d+: ERROR: invalid page in block 3 of relation"base\/\d+\/\d+"$/
11961196
);
11971197

11981198
my ($cs_count_after,$cs_ts_after) =
@@ -1214,7 +1214,7 @@ sub test_checksum
12141214
qq(
12151215
SELECT read_rel_block_ll('tbl_temp', 4, nblocks=>2, zero_on_error=>false);),
12161216
qr/^$/,
1217-
qr/^psql:<stdin>:\d+: ERROR: invalid page in block 4 of relation base\/\d+\/t\d+_\d+$/
1217+
qr/^psql:<stdin>:\d+: ERROR: invalid page in block 4 of relation"base\/\d+\/t\d+_\d+"$/
12181218
);
12191219

12201220
($cs_count_after,$cs_ts_after) = checksum_failures($psql_a,'postgres');
@@ -1235,7 +1235,7 @@ sub test_checksum
12351235
qq(
12361236
SELECT read_rel_block_ll('pg_shseclabel', 2, nblocks=>2, zero_on_error=>false);),
12371237
qr/^$/,
1238-
qr/^psql:<stdin>:\d+: ERROR: 2 invalid pages among blocks 2..3 of relation global\/\d+\nDETAIL: Block 2 held first invalid page\.\nHINT:[^\n]+$/
1238+
qr/^psql:<stdin>:\d+: ERROR: 2 invalid pages among blocks 2..3 of relation"global\/\d+"\nDETAIL: Block 2 held the first invalid page\.\nHINT:[^\n]+$/
12391239
);
12401240

12411241
($cs_count_after,$cs_ts_after) = checksum_failures($psql_a);
@@ -1300,7 +1300,7 @@ sub test_checksum_createdb
13001300
"create database w/ wal strategy, invalid source",
13011301
$createdb_sql,
13021302
qr/^$/,
1303-
qr/psql:<stdin>:\d+: ERROR: invalid page in block 1 of relation base\/\d+\/\d+$/
1303+
qr/psql:<stdin>:\d+: ERROR: invalid page in block 1 of relation"base\/\d+\/\d+"$/
13041304
);
13051305
my ($cs_count_after,$cs_ts_after) =
13061306
checksum_failures($psql,'regression_createdb_source');
@@ -1409,7 +1409,7 @@ sub test_ignore_checksum
14091409
qq(
14101410
SELECT read_rel_block_ll('tbl_cs_fail', 2, nblocks=>3, zero_on_error=>false);),
14111411
qr/^$/,
1412-
qr/^psql:<stdin>:\d+: ERROR: invalid page in block 4 of relation base\/\d+\/\d+$/
1412+
qr/^psql:<stdin>:\d+: ERROR: invalid page in block 4 of relation"base\/\d+\/\d+"$/
14131413
);
14141414

14151415
# Test multi-block read with different problems in different blocks
@@ -1431,7 +1431,7 @@ sub test_ignore_checksum
14311431
qq(
14321432
SELECT read_rel_block_ll('tbl_cs_fail', 1, nblocks=>5, zero_on_error=>true);),
14331433
qr/^$/,
1434-
qr/^psql:<stdin>:\d+: WARNING: zeroing 3 page\(s\) and ignoring 2 checksum failure\(s\) among blocks 1..5 of relation/
1434+
qr/^psql:<stdin>:\d+: WARNING: zeroing 3 page\(s\) and ignoring 2 checksum failure\(s\) among blocks 1..5 of relation "/
14351435
);
14361436

14371437

@@ -1444,17 +1444,17 @@ sub test_ignore_checksum
14441444
ok(1,"$io_method: found information about checksum failure in block 2");
14451445

14461446
$node->wait_for_log(
1447-
qr/LOG: invalid page in block 3 of relation base.*; zeroing out page/,
1447+
qr/LOG: invalid page in block 3 of relation"base.*"; zeroing out page/,
14481448
$log_location);
14491449
ok(1,"$io_method: found information about invalid page in block 3");
14501450

14511451
$node->wait_for_log(
1452-
qr/LOG: invalid page in block 4 of relation base.*; zeroing out page/,
1452+
qr/LOG: invalid page in block 4 of relation"base.*"; zeroing out page/,
14531453
$log_location);
14541454
ok(1,"$io_method: found information about checksum failure in block 4");
14551455

14561456
$node->wait_for_log(
1457-
qr/LOG: invalid page in block 5 of relation base.*; zeroing out page/,
1457+
qr/LOG: invalid page in block 5 of relation"base.*"; zeroing out page/,
14581458
$log_location);
14591459
ok(1,"$io_method: found information about checksum failure in block 5");
14601460

@@ -1473,7 +1473,7 @@ sub test_ignore_checksum
14731473
qq(
14741474
SELECT read_rel_block_ll('tbl_cs_fail', 3, nblocks=>1, zero_on_error=>false);),
14751475
qr/^$/,
1476-
qr/^psql:<stdin>:\d+: ERROR: invalid page in block 3 of relation/);
1476+
qr/^psql:<stdin>:\d+: ERROR: invalid page in block 3 of relation "/);
14771477

14781478
psql_like(
14791479
$io_method,
@@ -1482,7 +1482,7 @@ sub test_ignore_checksum
14821482
qq(
14831483
SELECT read_rel_block_ll('tbl_cs_fail', 3, nblocks=>1, zero_on_error=>true);),
14841484
qr/^$/,
1485-
qr/^psql:<stdin>:\d+: WARNING: invalid page in block 3 of relation base\/.*; zeroing out page/
1485+
qr/^psql:<stdin>:\d+: WARNING: invalid page in block 3 of relation"base\/.*"; zeroing out page/
14861486
);
14871487

14881488

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp