Re: reducing statistics write overhead

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: reducing statistics write overhead
Дата
Msg-id 20090121201702.GO4038@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: reducing statistics write overhead  (Martin Pihlak <martin.pihlak@gmail.com>)
Ответы Re: reducing statistics write overhead  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Martin Pihlak escribió:
> Alvaro Herrera wrote:
> > I agree that pgstats is not ideal (we've said this from the very
> > beginning), but I doubt that updating pg_class is the answer; you'd be
> > generating thousands of dead tuples there.
> 
> But we already do update pg_class after vacuum -- in vac_update_relstats().
> Hmm, that performs a heap_inplace_update() ... I assume that this is cheap,
> but have no idea as if it is suitable for the purpouse.

Oh, sorry, I thought you were suggesting to use pg_class to store number
of tuples dead/alive/etc.

I had a patch to introduce a new type of table, which would only be used
for non-transactional updates.  That would allow what you're proposing.
I think we discussed something similar to what you propose and rejected
it for some reason I can't recall offhand.  Search the archives for
pg_class_nt and pg_ntclass, that might give you some ideas.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: FWD: Re: Updated backslash consistency patch
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Cancelling idle in transaction state