Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uuNcO-0088TD-GO for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Sep 2025 04:00:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uuNcM-004CGR-21 for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Sep 2025 04:00:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uuNcL-004CGJ-Nc for pgsql-bugs@lists.postgresql.org; Fri, 05 Sep 2025 04:00:06 +0000 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uuNcK-000cCa-1W for pgsql-bugs@lists.postgresql.org; Fri, 05 Sep 2025 04:00:05 +0000 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-55f6abcd26bso3290544e87.1 for ; Thu, 04 Sep 2025 21:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1757044803; x=1757649603; darn=lists.postgresql.org; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=3NvpA1iFXD7s1014L63LZruodwPSovmvDSJzexeE2Po=; b=a3JMgzMY95eKr8tq9s6wtLJ6GvPmh+9mai576gbwHwCjtYlB4uvEqUpCCBCBXmcb3e QnBMXg4HFau1QeVVYeSkoya6SyOp7qrEJSxmzCrHI+/YJrS5kO6yC4ct98wc6TaaOXvK jpHXhQ6RrdIRZrUimwLWyKG62jBknjM9+ouxRbuhmmGr1MfsrNMWZtB8fha2zPqmXgGx tcDaLIZeRPh50xy8OR/xDQDFqS10qMjfgUMNT8YOJHC0DfaUOp4G5shm7nLoMQrBXyG4 5NxPV6MdgfFNkPzkNBXPTAzgOYws/b7DpBV0SsljuqtA6MLpc/639OO/7iHQwjhvguNv DUFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757044803; x=1757649603; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=3NvpA1iFXD7s1014L63LZruodwPSovmvDSJzexeE2Po=; b=bAhsjvxw8Z6tB2PVxIK/GhPtJLULXa686zuDVXrUL9ryhzPUdV442U2Qa2KcEZ+Keh OEi4phFIE/oAtnoCKBx5L196xfbBvTFZzUZ66eCfERLd8Ao5js4AAy0ObOVDez5L+OW7 0HSJVHhu7hLwgf3AVOpN0HNxX5CU9alsXScSnJCRVYK+VDLMvGp1sS/qlfXHmt6P/UzR lm+Kx08hbF194q9EDyRWF2O/Ygs0SJjOiHuU36LR/gIVmXSD+ZmzGXCWreg2anCNDQvS ZZR3wUiQfPtFltyvlCX3PQI93EkmMqSoNlV5US1AMb1vo/BWicCw9TxIK0gYi4teXEQj jUiQ== X-Gm-Message-State: AOJu0YwjWFI0gKpS+seZ0HiYXY7rSm9TDQ6Wtyslym2+/P/vZL3QIMtw 3NPnHT8TlYPL30g9RE899ipVrI6hoOMzaLZi5Z3++SxJevNqWWBXBOAN X-Gm-Gg: ASbGncugRh0V6dB2eaw5p0PjdRcqF1mXJFmaoIqyhhNLlQvzVE2vzzgSnNyQnwgnr/E DJQ4qOBwU9/JybXDjXZIr1EmARocASORVq+WncAnx403tK3+3z4mAwhS8k+INMnqUIcKP+a3fp2 lE67FItjAbYUOAAYFs9GdDt/hUOkQTXBXQGFf894nhO+4WsdOc5oUr5lvSUV723044YCu8dmVDp Se0Byx8174cbrZSvwJ1qsV4KE6ci6cQU9PTSA2FzwZVqMPmKxGTOUxAvUBTUSujWcIP5wDCXm48 tIuhkvq2Qxvv12S61kEAOo2vQeyXMWAN7CuChSj3JWSamJTKlVScH+oM66KVIPGnlKq9hP5R7rz TLNQX4srUe57Uhxbc77ZmY6qnGf7lhwqnh2Nv X-Google-Smtp-Source: AGHT+IGxLsZpZpni+S+S6BOaTdGU2LNonQ4Ssu4DQKW4JPS5Ey7g//kASE0ZcODgr8iR6YKtq0CKYA== X-Received: by 2002:a05:6512:3c9d:b0:560:83e2:1db7 with SMTP id 2adb3069b0e04-56099434b5fmr513433e87.6.1757044802513; Thu, 04 Sep 2025 21:00:02 -0700 (PDT) Received: from [192.168.0.50] ([89.149.120.198]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5608aba2266sm1574810e87.50.2025.09.04.21.00.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Sep 2025 21:00:01 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------G97Ox2llA9XKUIJhHSc12fFI" Message-ID: <53006653-ada7-40aa-9ef8-f52ca0bda4a4@gmail.com> Date: Fri, 5 Sep 2025 07:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: BUG #19037: Planner fails on estimating array length with "no relation entry" error To: Richard Guo , Tom Lane Cc: pgsql-bugs@lists.postgresql.org References: <19037-3d1c7bb553c7ce84@postgresql.org> <50858.1756590676@sss.pgh.pa.us> <346889.1756738657@sss.pgh.pa.us> <589702.1756826835@sss.pgh.pa.us> <711590.1756862355@sss.pgh.pa.us> Content-Language: en-US From: Alexander Lakhin In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------G97Ox2llA9XKUIJhHSc12fFI Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello Tom and Richard, 03.09.2025 11:08, Richard Guo wrote: >> 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 ... > I've decided to backpatch this fix to pre-v17 branches: using a root > that lacks a valid simple_rel_array in a cost estimation function > seems like a pitfall waiting to happen. I've included an explanation > of this backpatch decision in the commit message and have pushed the > fix (the test case is not included in pre-v17 branches though). Thank you for fixing that anomaly! Best regards, Alexander --------------G97Ox2llA9XKUIJhHSc12fFI Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
Hello Tom and Richard,

03.09.2025 11:08, Richard Guo wrote:
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 ...
I've decided to backpatch this fix to pre-v17 branches: using a root
that lacks a valid simple_rel_array in a cost estimation function
seems like a pitfall waiting to happen.  I've included an explanation
of this backpatch decision in the commit message and have pushed the
fix (the test case is not included in pre-v17 branches though).

Thank you for fixing that anomaly!

Best regards,
Alexander
--------------G97Ox2llA9XKUIJhHSc12fFI--