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 10:32:34 +0900
Message-ID: <avUXMh93q1MifJwq@paquier.xyz> (raw)
In-Reply-To: <avUVqCF7nvfowMQW@paquier.xyz>
References: <19857-6e808a09ff4b75d2@postgresql.org>
	<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>

On Thu, Nov 12, 2026 at 10:26:00AM +0900, Michael Paquier wrote:
> I cannot really get excited to allow this combination in the restore
> functions, though, as it means being more lenient on
> range_length_histogram forever, and the v19~ decision of using an
> empty array is much better to me in the long term.  An extra argument
> is that this case is super narrow anyway, unlikely to be hit in
> practice?  As far as I can see, you need a [multi]range column with
> less than *2* non-empty values..

Or we could do something on the dump side, forcing an empty array out
if seeing a NULL range_length_histogram..  Still not sure if that's
worth bothering, just saying.
--
Michael

Attachments:

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

view thread (13+ messages)  latest in thread

Message-ID: <avUXMh93q1MifJwq@paquier.xyz>
Permalink:  ../avUXMh93q1MifJwq@paquier.xyz/
Also on:    postgresql.org/message-id/avUXMh93q1MifJwq@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: <avUXMh93q1MifJwq@paquier.xyz>
  References: <19857-6e808a09ff4b75d2@postgresql.org> <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>

* 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