Re: pgstats_initstats() cost

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgstats_initstats() cost
Дата
Msg-id 6782.1060701568@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgstats_initstats() cost  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I said:
> I doubt a hash is worth maintaining, because the active tabstat entries
> should only be for tables that are being touched in the current command
> (thus, there are not more than six in your example).  I'm not sure why
> it takes so much time to look through six entries though ...

I replicated your example, and soon found that in fact there were
forty-three active tabstat slots, which makes pgstat_initstats a little
bit more credible as a time-waster.

The reason why there were forty-three, in a statement that's only
touching one relation, is that with the present coding of pgstats,
if you have stats gathering off then there will be an active entry
for every relation that's been touched since backend launch.
pgstat_report_tabstat() should have flushed the entries, but
*if reporting is disabled then it fails to do so*.

This is clearly a bug.  Will fix.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: reuse sysids security hole?
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: reuse sysids security hole?