Re: Statistics Import and Export

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: Statistics Import and Export
Дата
Msg-id aC5F1LX6-uL0wRV1@nathan
обсуждение исходный текст
Ответ на Re: Statistics Import and Export  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: Statistics Import and Export
Re: Statistics Import and Export
Список pgsql-hackers
On Wed, May 21, 2025 at 02:14:55PM -0700, Jeff Davis wrote:
> Originally, one of the reasons we added a version field during dump is
> so that some future version could reinterpret stats in older dump files
> during import.
> 
> This patch is using a newer version of pg_dump to interpret stats from
> older versions during export. That might be fine, but it would be good
> to understand where the line is between things we should reinterpret
> during export vs things we should reinterpret during import.

I don't know precisely where that line might be, but in this case, the
dumped stats have no hope of restoring into anything older than v18 (since
the stats import functions won't exist), which is well past the point where
we started using -1 for reltuples.  If we could dump the stats from v13 and
restore them into v13, then I think there would be a reasonably strong
argument for dumping it as-is and reinterpreting as necessary during
import.  But I see no particular benefit from moving the complexity to the
import side here.

Does that seem like a reasonable position to you?  Is there anything else
we should consider?

-- 
nathan



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