Re: regarding statistics retaining with 18 Upgrade

From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Rambabu V <ram(dot)wissen(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: regarding statistics retaining with 18 Upgrade
Date: 2025-11-15 16:02:23
Message-ID: CAKAnmmJ=r_4-bdigQgv4LhUUpB=dF2Lex_4jbQtN+EZC0OdvZg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Nov 15, 2025 at 9:32 AM Bruce Momjian <bruce(at)momjian(dot)us> wrote:

> Uh, it is the _optimizer_ statistics that are preserved by pg_upgrade,
>

Specifically, check out the pg_stats view. Try this on your new cluster:

select count(distinct tablename) from pg_stats where tablename !~
'pg_|sql_';

Cheers,
Greg

--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema-Nio 2025-11-15 16:36:37 Re: Early December Commitfest app release
Previous Message Tom Lane 2025-11-15 15:57:07 Re: should we have a fast-path planning for OLTP starjoins?