On Thu, Mar 6, 2025 at 9:29 AM Andres Freund <andres@anarazel.de> wrote:
> But TBH, I do wonder how much the current memory usage of the statistics
> dump/restore support is going to bite us. In some cases this will dramatically
> increase pg_dump/pg_upgrade's memory usage, my tests were with tiny amounts of
> data and very simple scalar datatypes and you already could see a substantial
> increase. With something like postgis or even just a lot of jsonb columns
> this is going to be way worse.
To be honest, I am a bit surprised that we decided to enable this by
default. It's not obvious to me that statistics should be regarded as
part of the database in the same way that table definitions or table
data are. That said, I'm not overwhelmingly opposed to that choice.
However, even if it's the right choice in theory, we should maybe
rethink if it's going to be too slow or use too much memory.
--
Robert Haas
EDB: http://www.enterprisedb.com