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

Commitf020baa

Browse files
Rename LVRelState->frozen_pages
Rename frozen_pages to new_frozen_tuple_pages in LVRelState, the structused for tracking state during vacuuming of a heap relation.frozen_pages sounds like it tracks pages set all-frozen. That is amisnomer. It only includes pages with at least one newly frozen tuple.It also includes pages that are not all-frozen.Author: Melanie PlagemanReviewed-by: Andres Freund, Masahiko Sawada, Nitin Jadhav, Bilal YavuzDiscussion:https://postgr.es/m/ctdjzroezaxmiyah3gwbwm67defsrwj2b5fpfs4ku6msfpxeia%40mwjyqlhwr2wu
1 parent21fb39c commitf020baa

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

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

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ typedef struct LVRelState
188188
BlockNumberrel_pages;/* total number of pages */
189189
BlockNumberscanned_pages;/* # pages examined (not skipped via VM) */
190190
BlockNumberremoved_pages;/* # pages removed by relation truncation */
191-
BlockNumberfrozen_pages;/* # pages with newly frozen tuples */
191+
BlockNumbernew_frozen_tuple_pages;/* # pages with newly frozen tuples */
192192
BlockNumberlpdead_item_pages;/* # pages with LP_DEAD items */
193193
BlockNumbermissed_dead_pages;/* # pages with missed dead tuples */
194194
BlockNumbernonempty_pages;/* actually, last nonempty page + 1 */
@@ -407,7 +407,7 @@ heap_vacuum_rel(Relation rel, VacuumParams *params,
407407
/* Initialize page counters explicitly (be tidy) */
408408
vacrel->scanned_pages=0;
409409
vacrel->removed_pages=0;
410-
vacrel->frozen_pages=0;
410+
vacrel->new_frozen_tuple_pages=0;
411411
vacrel->lpdead_item_pages=0;
412412
vacrel->missed_dead_pages=0;
413413
vacrel->nonempty_pages=0;
@@ -696,9 +696,10 @@ heap_vacuum_rel(Relation rel, VacuumParams *params,
696696
vacrel->NewRelminMxid,diff);
697697
}
698698
appendStringInfo(&buf,_("frozen: %u pages from table (%.2f%% of total) had %lld tuples frozen\n"),
699-
vacrel->frozen_pages,
699+
vacrel->new_frozen_tuple_pages,
700700
orig_rel_pages==0 ?100.0 :
701-
100.0*vacrel->frozen_pages /orig_rel_pages,
701+
100.0*vacrel->new_frozen_tuple_pages /
702+
orig_rel_pages,
702703
(long long)vacrel->tuples_frozen);
703704
if (vacrel->do_index_vacuuming)
704705
{
@@ -1453,11 +1454,12 @@ lazy_scan_prune(LVRelState *vacrel,
14531454
if (presult.nfrozen>0)
14541455
{
14551456
/*
1456-
* We don't increment the frozen_pages instrumentation counter when
1457-
* nfrozen == 0, since it only counts pages with newly frozen tuples
1458-
* (don't confuse that with pages newly set all-frozen in VM).
1457+
* We don't increment the new_frozen_tuple_pages instrumentation
1458+
* counter when nfrozen == 0, since it only counts pages with newly
1459+
* frozen tuples (don't confuse that with pages newly set all-frozen
1460+
* in VM).
14591461
*/
1460-
vacrel->frozen_pages++;
1462+
vacrel->new_frozen_tuple_pages++;
14611463
}
14621464

14631465
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp