pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Corey Huinker <corey.huinker@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Cc: 125atishprak@gmail.com
Subject: Re: BUG #19857: Stats restore rejects empty arrays, losing range and array stats
Date: Thu, 12 Nov 2026 14:10:19 +0900
Message-ID: <avVKOwRYbT6aD3wR@paquier.xyz> (raw)
In-Reply-To: <CADkLM=c8i+Xv6-twg4+BcEgKp9hDX01pt1qUF-s+6JNxqi-6xA@mail.gmail.com>
References: <CADkLM=dgnnbdMF3T4Him9O+h+-_MArPzZ13SMm4g8LpAXAqmeQ@mail.gmail.com>
	<CADkLM=eyZKWTwFYh=Yyi-zqQwmkdZyVJaUD0tijoBZr=OTkFeQ@mail.gmail.com>
	<CADkLM=fo1+1LwJo2Jbi3S-MS--4257Q9gA9Pt6tWhwFzzPh8Sg@mail.gmail.com>
	<avQcPMvpFykeUGli@paquier.xyz>
	<CADkLM=fB1qJJZswCzSs7M=fG3ayXn8hdHy2a6vsAcrgVMVNY-w@mail.gmail.com>
	<avTu757_g0z96QA2@paquier.xyz>
	<avUVqCF7nvfowMQW@paquier.xyz>
	<avUXMh93q1MifJwq@paquier.xyz>
	<CADkLM=cWtd4Un_y_M0RaJTyPRxANM9M5bGNwEionxQ7Ei6FzCA@mail.gmail.com>
	<CADkLM=c8i+Xv6-twg4+BcEgKp9hDX01pt1qUF-s+6JNxqi-6xA@mail.gmail.com>

On Wed, Nov 11, 2026 at 11:55:08PM -0500, Corey Huinker wrote:
> But the problem still exists on 18, and that isn't a clean backport.
> Michael, do you want me to take that one?

The only problem that can be reached is if we dump or upgrade from a
v17 or v18 instance with the pattern of a range_empty_frac set with
range_length_histogram as NULL, where we could perhaps switch
range_length_histogram to '{}' under-the-hood on the dump side if a
range_empty_frac exists.  I don't want the restore functions to live
eternally with a path authorizing for range_length_histogram=NULL if
there is a range_empty_frac, especially now that
range_length_histogram has to be an empty array since v19~.

And the end, I have no plans to bother based on the table definition
this requires.  I could still care with something on the dump side,
but I doubt that's worth the effort anyway.  What's been done on HEAD
and v19 is enough for these new empty-array cases.  :)
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (13+ messages)  latest in thread

Message-ID: <avVKOwRYbT6aD3wR@paquier.xyz>
Permalink:  ../avVKOwRYbT6aD3wR@paquier.xyz/
Also on:    postgresql.org/message-id/avVKOwRYbT6aD3wR@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, corey.huinker@gmail.com, 125atishprak@gmail.com
  Subject: Re: BUG #19857: Stats restore rejects empty arrays, losing range and array stats
  In-Reply-To: <avVKOwRYbT6aD3wR@paquier.xyz>
  References: <CADkLM=dgnnbdMF3T4Him9O+h+-_MArPzZ13SMm4g8LpAXAqmeQ@mail.gmail.com> <CADkLM=eyZKWTwFYh=Yyi-zqQwmkdZyVJaUD0tijoBZr=OTkFeQ@mail.gmail.com> <CADkLM=fo1+1LwJo2Jbi3S-MS--4257Q9gA9Pt6tWhwFzzPh8Sg@mail.gmail.com> <avQcPMvpFykeUGli@paquier.xyz> <CADkLM=fB1qJJZswCzSs7M=fG3ayXn8hdHy2a6vsAcrgVMVNY-w@mail.gmail.com> <avTu757_g0z96QA2@paquier.xyz> <avUVqCF7nvfowMQW@paquier.xyz> <avUXMh93q1MifJwq@paquier.xyz> <CADkLM=cWtd4Un_y_M0RaJTyPRxANM9M5bGNwEionxQ7Ei6FzCA@mail.gmail.com> <CADkLM=c8i+Xv6-twg4+BcEgKp9hDX01pt1qUF-s+6JNxqi-6xA@mail.gmail.com> <avVKOwRYbT6aD3wR@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox