Re: Why not represent "never vacuumed" accurately wrt pg_class.relpages?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Why not represent "never vacuumed" accurately wrt pg_class.relpages?
Дата
Msg-id 7951.1544539658@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Why not represent "never vacuumed" accurately wrt pg_class.relpages?  (Andres Freund <andres@anarazel.de>)
Ответы Re: Why not represent "never vacuumed" accurately wrtpg_class.relpages?  (Andres Freund <andres@anarazel.de>)
Re: Why not represent "never vacuumed" accurately wrt pg_class.relpages?  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> I don't quite get why we don't instead just represent "never vacuumed"
> by storing a more meaningful value in relpages?

Mostly, not wanting to break clients that look at these fields.
If catalog compatibility weren't a concern, I'd seriously consider
replacing both of them with a float "average tuples per page" ratio.

> We could go for
> InvalidBlockNumber, or even NULL (although the latter would be a bit
> annoying due to not being mappable to a struct anymore).

NULL seems right out on every ground.  I don't much care for
InvalidBlockNumber either.

> I've seen numerous cases where relpages = 0 -> never vacuumed has caused
> worse plans, and it just doesn't seem necessary?

Worse plans than what?  And why do you blame it on this representation?
We don't believe that relpages is the actual size of the table.

            regards, tom lane


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

Предыдущее
От: David Steele
Дата:
Сообщение: Re: Add timeline to partial WAL segments
Следующее
От: Pablo Iranzo Gómez
Дата:
Сообщение: Re: Introducing SNI in TLS handshake for SSL connections