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

Commitd954019

Browse files
committed
Message style improvements
1 parente5f6493 commitd954019

File tree

2 files changed

+25
-21
lines changed

2 files changed

+25
-21
lines changed

‎src/backend/access/heap/vacuumlazy.c

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -807,21 +807,21 @@ heap_vacuum_rel(Relation rel, VacuumParams *params,
807807

808808
if (vacrel->do_index_vacuuming)
809809
{
810-
msgfmt=_("%u pages from table (%.2f%% of total) had %lld dead item identifiers removed\n");
810+
msgfmt=_("%u pages from table (%.2f%% of total) had %lld dead item identifiers removed\n");
811811

812812
if (vacrel->nindexes==0||vacrel->num_index_scans==0)
813-
appendStringInfoString(&buf,_("index scan not needed:"));
813+
appendStringInfoString(&buf,_("index scan not needed:"));
814814
else
815-
appendStringInfoString(&buf,_("index scan needed:"));
815+
appendStringInfoString(&buf,_("index scan needed:"));
816816
}
817817
else
818818
{
819-
msgfmt=_("%u pages from table (%.2f%% of total) have %lld dead item identifiers\n");
819+
msgfmt=_("%u pages from table (%.2f%% of total) have %lld dead item identifiers\n");
820820

821821
if (!vacrel->failsafe_active)
822-
appendStringInfoString(&buf,_("index scan bypassed:"));
822+
appendStringInfoString(&buf,_("index scan bypassed:"));
823823
else
824-
appendStringInfoString(&buf,_("index scan bypassed by failsafe:"));
824+
appendStringInfoString(&buf,_("index scan bypassed by failsafe:"));
825825
}
826826
orig_rel_pages=vacrel->rel_pages+vacrel->pages_removed;
827827
appendStringInfo(&buf,msgfmt,
@@ -848,12 +848,14 @@ heap_vacuum_rel(Relation rel, VacuumParams *params,
848848
read_rate,write_rate);
849849
if (track_io_timing)
850850
{
851-
appendStringInfoString(&buf,_("I/OTimings:"));
851+
appendStringInfoString(&buf,_("I/Otimings:"));
852852
if (pgStatBlockReadTime-startreadtime>0)
853-
appendStringInfo(&buf,_(" read=%.3f"),
853+
appendStringInfo(&buf,_(" read:%.3f ms"),
854854
(double) (pgStatBlockReadTime-startreadtime) /1000);
855+
if ((pgStatBlockReadTime-startreadtime>0)&& (pgStatBlockWriteTime-startwritetime>0))
856+
appendStringInfoString(&buf,_(","));
855857
if (pgStatBlockWriteTime-startwritetime>0)
856-
appendStringInfo(&buf,_(" write=%.3f"),
858+
appendStringInfo(&buf,_(" write:%.3f ms"),
857859
(double) (pgStatBlockWriteTime-startwritetime) /1000);
858860
appendStringInfoChar(&buf,'\n');
859861
}
@@ -1650,7 +1652,7 @@ lazy_scan_heap(LVRelState *vacrel, VacuumParams *params, bool aggressive)
16501652
*/
16511653
if (vacrel->nindexes==0&&vacrel->lpdead_item_pages>0)
16521654
ereport(elevel,
1653-
(errmsg("\"%s\": removed %lld dead item identifiers in %u pages",
1655+
(errmsg("table\"%s\": removed %lld dead item identifiers in %u pages",
16541656
vacrel->relname, (long long)vacrel->lpdead_items,
16551657
vacrel->lpdead_item_pages)));
16561658

@@ -1673,7 +1675,7 @@ lazy_scan_heap(LVRelState *vacrel, VacuumParams *params, bool aggressive)
16731675
appendStringInfo(&buf,_("%s."),pg_rusage_show(&ru0));
16741676

16751677
ereport(elevel,
1676-
(errmsg("\"%s\": found %lld removable, %lld nonremovable row versions in %u out of %u pages",
1678+
(errmsg("table\"%s\": found %lld removable, %lld nonremovable row versions in %u out of %u pages",
16771679
vacrel->relname,
16781680
(long long)vacrel->tuples_deleted,
16791681
(long long)vacrel->num_tuples,vacrel->scanned_pages,
@@ -2177,7 +2179,7 @@ lazy_vacuum(LVRelState *vacrel)
21772179
*/
21782180
vacrel->do_index_vacuuming= false;
21792181
ereport(elevel,
2180-
(errmsg("\"%s\": index scan bypassed: %u pages from table (%.2f%% of total) have %lld dead item identifiers",
2182+
(errmsg("table\"%s\": index scan bypassed: %u pages from table (%.2f%% of total) have %lld dead item identifiers",
21812183
vacrel->relname,vacrel->lpdead_item_pages,
21822184
100.0*vacrel->lpdead_item_pages /vacrel->rel_pages,
21832185
(long long)vacrel->lpdead_items)));
@@ -2388,8 +2390,8 @@ lazy_vacuum_heap_rel(LVRelState *vacrel)
23882390
vacuumed_pages==vacrel->lpdead_item_pages));
23892391

23902392
ereport(elevel,
2391-
(errmsg("\"%s\": removed %d dead item identifiers in %u pages",
2392-
vacrel->relname,tupindex,vacuumed_pages),
2393+
(errmsg("table\"%s\": removed %lld dead item identifiers in %u pages",
2394+
vacrel->relname,(long long )tupindex,vacuumed_pages),
23932395
errdetail_internal("%s",pg_rusage_show(&ru0))));
23942396

23952397
/* Revert to the previous phase information for error traceback */
@@ -2625,7 +2627,7 @@ lazy_check_wraparound_failsafe(LVRelState *vacrel)
26252627
vacrel->relnamespace,
26262628
vacrel->relname,
26272629
vacrel->num_index_scans),
2628-
errdetail("table's relfrozenxid or relminmxid is too far in the past"),
2630+
errdetail("Thetable's relfrozenxid or relminmxid is too far in the past."),
26292631
errhint("Consider increasing configuration parameter \"maintenance_work_mem\" or \"autovacuum_work_mem\".\n"
26302632
"You might also need to consider other ways for VACUUM to keep up with the allocation of transaction IDs.")));
26312633

@@ -4261,7 +4263,7 @@ vacuum_error_callback(void *arg)
42614263
if (BlockNumberIsValid(errinfo->blkno))
42624264
{
42634265
if (OffsetNumberIsValid(errinfo->offnum))
4264-
errcontext("while scanning block %uandoffset %u of relation \"%s.%s\"",
4266+
errcontext("while scanning block %u offset %u of relation \"%s.%s\"",
42654267
errinfo->blkno,errinfo->offnum,errinfo->relnamespace,errinfo->relname);
42664268
else
42674269
errcontext("while scanning block %u of relation \"%s.%s\"",
@@ -4276,7 +4278,7 @@ vacuum_error_callback(void *arg)
42764278
if (BlockNumberIsValid(errinfo->blkno))
42774279
{
42784280
if (OffsetNumberIsValid(errinfo->offnum))
4279-
errcontext("while vacuuming block %uandoffset %u of relation \"%s.%s\"",
4281+
errcontext("while vacuuming block %u offset %u of relation \"%s.%s\"",
42804282
errinfo->blkno,errinfo->offnum,errinfo->relnamespace,errinfo->relname);
42814283
else
42824284
errcontext("while vacuuming block %u of relation \"%s.%s\"",

‎src/backend/commands/analyze.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
778778
* reads which are also picked up by track_io_timing, if enabled,
779779
* the 'average write rate' is actually talking about the rate of
780780
* pages being dirtied, not being written out, so it's typical to
781-
* have a non-zero 'avg write rate' while I/OTimings only reports
781+
* have a non-zero 'avg write rate' while I/Otimings only reports
782782
* reads.
783783
*
784784
* It's not clear that an ANALYZE will ever result in
@@ -813,12 +813,14 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
813813
read_rate,write_rate);
814814
if (track_io_timing)
815815
{
816-
appendStringInfoString(&buf,_("I/OTimings:"));
816+
appendStringInfoString(&buf,_("I/Otimings:"));
817817
if (pgStatBlockReadTime-startreadtime>0)
818-
appendStringInfo(&buf,_(" read=%.3f"),
818+
appendStringInfo(&buf,_(" read:%.3f ms"),
819819
(double) (pgStatBlockReadTime-startreadtime) /1000);
820+
if ((pgStatBlockReadTime-startreadtime>0)&& (pgStatBlockWriteTime-startwritetime>0))
821+
appendStringInfoString(&buf,_(","));
820822
if (pgStatBlockWriteTime-startwritetime>0)
821-
appendStringInfo(&buf,_(" write=%.3f"),
823+
appendStringInfo(&buf,_(" write:%.3f ms"),
822824
(double) (pgStatBlockWriteTime-startwritetime) /1000);
823825
appendStringInfoChar(&buf,'\n');
824826
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp