Re: tableam: abstracting relation sizing code

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: tableam: abstracting relation sizing code
Дата
Msg-id 20190610194648.GA9230@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: tableam: abstracting relation sizing code  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: tableam: abstracting relation sizing code  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 2019-Jun-10, Robert Haas wrote:

> On Fri, Jun 7, 2019 at 6:42 PM Daniel Gustafsson <daniel@yesql.se> wrote:

> > The commit message still refers to it as estimate_rel_size though. The comment on
> > table_block_relation_estimate_size does too but that one might be intentional.
> 
> Oops.  New version attached, hopefully fixing those and the compiler
> warning Alvaro noted.

It does fix the warning, thanks.

> > Maybe I’m a bit thick but if the rel is totally empty and without children,
> > then curpages as well as relpages would be both zero.  But if so, how can we
> > enter the second "quick exit” block since curpages by then will be increased to
> > 10 in the block just before for the empty case?  It seems to me that the blocks
> > should be the other way around to really have a fast path, but I might be
> > missing something.
> 
> Well, as you say, I'm just moving the code.

I agree that you're just moving the code, but this seems to have been
recently broken in 696d78469f37 -- it was correct before that (the
heuristic for never vacuumed rels was in optimizer/plancat.c).  So in
reality the problem that Daniel pointed out is an open item for pg12.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: tableam: abstracting relation sizing code
Следующее
От: "Goel, Dhruv"
Дата:
Сообщение: Re: Avoiding deadlock errors in CREATE INDEX CONCURRENTLY