pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19037: Planner fails on estimating array length with "no relation entry" error
Date: Tue, 02 Sep 2025 21:19:15 -0400
Message-ID: <711590.1756862355@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMbWs4-g7LJ+W_dL1_=O6OOZ=wwxtUPbwypdgsVWMnm=wcW1Yw@mail.gmail.com>
References: <19037-3d1c7bb553c7ce84@postgresql.org>
	<50858.1756590676@sss.pgh.pa.us>
	<CAMbWs4_5Q3V_M1FavN07TxcOHhE38vtBaHs-LM2-RN=paYGi-g@mail.gmail.com>
	<346889.1756738657@sss.pgh.pa.us>
	<CAMbWs4_KfP=2Rkne2+fAHE8yQAuZL2C8wH4DSLrOa4s5v=yN7g@mail.gmail.com>
	<589702.1756826835@sss.pgh.pa.us>
	<CAMbWs4-g7LJ+W_dL1_=O6OOZ=wwxtUPbwypdgsVWMnm=wcW1Yw@mail.gmail.com>

Richard Guo <guofenglinux@gmail.com> writes:
> One thing I'm not quite sure about is whether we should backpatch this
> fix to pre-v17 branches.  Prior to v17, estimate_array_length() wasn't
> taught to use statistics, so this error isn't reproducible there.
> OTOH, passing a root without a valid simple_rel_array to
> cost_qual_eval() still seems potentially unsafe.  What do you think?

Yeah, "is there any other instance of this problem?" is the $64
question here.  I was initially thinking v17 is sufficient, but
the possibility that some extension might be vulnerable makes
me lean to back-patching further.  Your call ...

			regards, tom lane





view thread (11+ messages)  latest in thread

Message-ID: <711590.1756862355@sss.pgh.pa.us>
Permalink:  ../711590.1756862355@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/711590.1756862355@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, guofenglinux@gmail.com, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #19037: Planner fails on estimating array length with "no relation entry" error
  In-Reply-To: <711590.1756862355@sss.pgh.pa.us>

* 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