[HACKERS] Unused variable scanned_tuples in LVRelStats

Поиск
Список
Период
Сортировка
От Masahiko Sawada
Тема [HACKERS] Unused variable scanned_tuples in LVRelStats
Дата
Msg-id CAD21AoAMuG8Pbr7GUim5LLCi4wgL2-=q1Gp-P8_0tyYDHtq13g@mail.gmail.com
обсуждение исходный текст
Ответы Re: [HACKERS] Unused variable scanned_tuples in LVRelStats  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hi,

scanned_tuples variable in LVRelStats is introduced by commit b4b6923e
but it seems to me that it's actually not used. We store num_tuples
into vacrelstats->scanned_tuples after scanned all blocks, and the
comment mentioned that saving it in order to use later but we actually
use num_tuples instead of vacrelstats->scanned_tuples from there. I
think the since the name of scanned_tuples implies more clearer
purpose than num_tuples it's better to use it instead of num_tuples,
or we can remove scanned_tuples from LVRelStats.

    /* save stats for use later */
    vacrelstats->scanned_tuples = num_tuples;
    vacrelstats->tuples_deleted = tups_vacuumed;
    vacrelstats->new_dead_tuples = nkeep;

Attached small path fixes this.

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server
Следующее
От: Noah Misch
Дата:
Сообщение: Re: [HACKERS] Reducing runtime of stats regression test