Re: regarding statistics retaining with 18 Upgrade

From: Rambabu V <ram(dot)wissen(at)gmail(dot)com>
To: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Cc: Robert Treat <rob(at)xzilla(dot)net>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: regarding statistics retaining with 18 Upgrade
Date: 2025-11-16 05:03:30
Message-ID: CADtiZxqvRjSF+9bu6E_gZ-5hma0G7-_5eH+U=wfYDvU-H1ACtA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks all for the proactive response and clarification.

people will be confused by seeing the release notes, it should be a little
bit clear or need to update.

i have one more question :

with every version of package installation , PG 17 version is getting by
default installed, is it a hard dependency or bug?

*[root(at)db1 ~]# dnf install -y postgresql16-server postgresql16-contrib
-y*Updating
Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use "rhc"
or "subscription-manager" to register.

Last metadata expiration check: 0:05:28 ago on Sun Nov 16 04:56:13 2025.
Dependencies resolved.
====================================================================================================================================================================================================================
Package Architecture
Version
Repository Size
====================================================================================================================================================================================================================
Installing:
postgresql16-contrib x86_64
16.11-1PGDG.rhel10
pgdg16 730 k
postgresql16-server x86_64
16.11-1PGDG.rhel10
pgdg16 6.8 M
Installing dependencies:
libicu x86_64
74.2-5.el10_0
rhel-10-baseos-rhui-rpms 10 M
libxslt x86_64
1.1.39-8.el10_0
rhel-10-appstream-rhui-rpms 190 k
postgresql16 x86_64
16.11-1PGDG.rhel10
pgdg16 1.8 M
postgresql16-libs x86_64
16.11-1PGDG.rhel10
pgdg16 339 k
postgresql17 x86_64
17.7-1PGDG.rhel10
pgdg17 1.9 M
postgresql17-libs x86_64
17.7-1PGDG.rhel10
pgdg17 346 k
Installing weak dependencies:
postgresql17-server x86_64
17.7-1PGDG.rhel10
pgdg17 7.0 M

Transaction Summary
====================================================================================================================================================================================================================
Install 9 Packages

Total download size: 30 M
Installed size: 120 M
Downloading Packages:
(1/9): postgresql17-libs-17.7-1PGDG.rhel10.x86_64.rpm

11 MB/s | 346 kB 00:00
(2/9): postgresql17-17.7-1PGDG.rhel10.x86_64.rpm

42 MB/s | 1.9 MB 00:00
(3/9): postgresql16-16.11-1PGDG.rhel10.x86_64.rpm

56 MB/s | 1.8 MB 00:00
(4/9): postgresql16-contrib-16.11-1PGDG.rhel10.x86_64.rpm

25 MB/s | 730 kB 00:00
(5/9): postgresql16-libs-16.11-1PGDG.rhel10.x86_64.rpm

20 MB/s | 339 kB 00:00
(6/9): libxslt-1.1.39-8.el10_0.x86_64.rpm

6.6 MB/s | 190 kB 00:00
(7/9): libicu-74.2-5.el10_0.x86_64.rpm

104 MB/s | 10 MB 00:00
(8/9): postgresql17-server-17.7-1PGDG.rhel10.x86_64.rpm

28 MB/s | 7.0 MB 00:00
(9/9): postgresql16-server-16.11-1PGDG.rhel10.x86_64.rpm

33 MB/s | 6.8 MB 00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total

92 MB/s | 30 MB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing :

1/1
Installing : postgresql17-libs-17.7-1PGDG.rhel10.x86_64

1/9
Running scriptlet: postgresql17-libs-17.7-1PGDG.rhel10.x86_64

1/9
Installing : libicu-74.2-5.el10_0.x86_64

2/9
Installing : postgresql16-libs-16.11-1PGDG.rhel10.x86_64

3/9
Running scriptlet: postgresql16-libs-16.11-1PGDG.rhel10.x86_64

3/9
Installing : postgresql16-16.11-1PGDG.rhel10.x86_64

4/9
Running scriptlet: postgresql16-16.11-1PGDG.rhel10.x86_64

4/9
Installing : postgresql17-17.7-1PGDG.rhel10.x86_64

5/9
Running scriptlet: postgresql17-17.7-1PGDG.rhel10.x86_64

5/9
Running scriptlet: postgresql17-server-17.7-1PGDG.rhel10.x86_64

6/9
Installing : postgresql17-server-17.7-1PGDG.rhel10.x86_64

6/9
Running scriptlet: postgresql17-server-17.7-1PGDG.rhel10.x86_64

6/9
Running scriptlet: postgresql16-server-16.11-1PGDG.rhel10.x86_64

7/9
Installing : postgresql16-server-16.11-1PGDG.rhel10.x86_64

7/9
Running scriptlet: postgresql16-server-16.11-1PGDG.rhel10.x86_64

7/9
Installing : libxslt-1.1.39-8.el10_0.x86_64

8/9
Installing : postgresql16-contrib-16.11-1PGDG.rhel10.x86_64

9/9
Running scriptlet: postgresql16-contrib-16.11-1PGDG.rhel10.x86_64

9/9
Installed products updated.

Installed:
libicu-74.2-5.el10_0.x86_64
libxslt-1.1.39-8.el10_0.x86_64
postgresql16-16.11-1PGDG.rhel10.x86_64
postgresql16-contrib-16.11-1PGDG.rhel10.x86_64
postgresql16-libs-16.11-1PGDG.rhel10.x86_64
postgresql16-server-16.11-1PGDG.rhel10.x86_64
postgresql17-17.7-1PGDG.rhel10.x86_64
postgresql17-libs-17.7-1PGDG.rhel10.x86_64
postgresql17-server-17.7-1PGDG.rhel10.x86_64

Complete!

*[root(at)db1 ~]# rpm -qa|grep
postgrespostgresql17-libs-17.7-1PGDG.rhel10.x86_64postgresql16-libs-16.11-1PGDG.rhel10.x86_64postgresql16-16.11-1PGDG.rhel10.x86_64postgresql17-17.7-1PGDG.rhel10.x86_64postgresql17-server-17.7-1PGDG.rhel10.x86_64postgresql16-server-16.11-1PGDG.rhel10.x86_64postgresql16-contrib-16.11-1PGDG.rhel10.x86_64*

On Sun, Nov 16, 2025 at 12:43 PM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:

> On Sun, Nov 16, 2025 at 5:22 AM Robert Treat <rob(at)xzilla(dot)net> wrote:
> >
> > On Sat, Nov 15, 2025 at 9:32 AM Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > > On Sat, Nov 15, 2025 at 06:02:53PM +0800, Rambabu V wrote:
> > > > Hi Team,
> > > >
> > > > seems stats are not retained after upgrade. Below are the artifacts
> , is it
> > > > expected? as per the release notes statistics should be retained.
> > >
> > > Uh, it is the _optimizer_ statistics that are preserved by pg_upgrade,
> > > not the cumulative statistics system:
> > >
> > > https://www.postgresql.org/docs/current/monitoring-stats.html
> > >
> > > Yes, they are easily confused.
> > >
> >
> > I wonder if it might be worth trying to clarify this a little bit
> > more... perhaps something like the attached?
>
> IMHO it makes sense to update the doc as you suggested to avoid any
> confusion.
>
> --
> Regards,
> Dilip Kumar
> Google
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2025-11-16 12:08:58 Re: Implement waiting for wal lsn replay: reloaded
Previous Message Dilip Kumar 2025-11-16 04:43:40 Re: regarding statistics retaining with 18 Upgrade