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.96) (envelope-from ) id 1w31v7-000pZb-2z for pgsql-bugs@arkaria.postgresql.org; Thu, 19 Mar 2026 01:11:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w31v4-00Fm6p-1U for pgsql-bugs@arkaria.postgresql.org; Thu, 19 Mar 2026 01:11:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w31v4-00Fm6h-0i for pgsql-bugs@lists.postgresql.org; Thu, 19 Mar 2026 01:11:26 +0000 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w31v1-000000012VP-391B for pgsql-bugs@lists.postgresql.org; Thu, 19 Mar 2026 01:11:25 +0000 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-b9358dd7f79so59251966b.1 for ; Wed, 18 Mar 2026 18:11:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773882683; cv=none; d=google.com; s=arc-20240605; b=EKbohIsThGPXgLq9c6m79JSDiT5VAv0sls2w220Bk2hDPLxGjfj0bqW5RU+4Ux+F1o cCRUSjDB44LtBF1bMlDdV1aBjm5E93cwVLwbF0VXiEtvuaYJH0eayHHHSzMYP8jF48uu pp31MkjZAsfQvASBQofQhHT7kw6ik+qH8y/td2tdXQ6w8Nkm9knovjVSI3j7C6exwOVF hMH5R2UO7MDOf9cRmy0tEFuTqLw0Qg4W8kSqhvCSTRpe+KLyBaCpBhzVABsxlrP1Y1dJ YvdstWKKEw4oVpyrNlGqu68nq9m5Au9D7FAN8G7HxijAdEX5269NeRGr02eYT8SjBWSX Eviw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=KtOL0tajoidjvetUDYT0EZHm3fDU6nhnkE0au786X5c=; fh=iGYGiEPGKSx+An/7bQSohmVoD5tc/Qo00UJ3gHjM530=; b=O3yf0f6MxD8ylJl9vseY44kI7INAUv2PKFtnTWh6tS4Y8+xHq9QKp/BoU4U8LsXy0e kepVLLHB0VzTTCNR+BXqZPUA3Tviq34D1F7SKURV6QRrFWujZBrOMbt7Q2GaxQHmwnQl tDXDJ48RCSzldSaJXb4fS5PuIqwvXSnjNQS45DGrdzpt3hrKj36/LopzFxqhFj1SaiuQ tfuQbmHh8zWuqMAvJqeUjShcByZ6909Q4QEjU/pK3qv+t6nAd7oO20mFkRgTiMf5Jd24 Xz2+fO6Hh62qHzIqpgyyhn4YpR+69fx+x1ILFS/lTegnbpydu3qDROTCaog78q1wuBK0 GGMw==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773882683; x=1774487483; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=KtOL0tajoidjvetUDYT0EZHm3fDU6nhnkE0au786X5c=; b=hLJJiS/jFQJ0fbZ9Cwz46bHTrr0lcsYkOeLY5PerReXv4bEUp2+y3gvwFyDP+eM/qm N+LlieOYJh297UaQ6bWs2TADR6rBMNMYZ9eCjY/8VcwOvSUZ3/2Rn5IF3bzoPIeW3d0m cnCpBkbD1guWMd5gI1d/G/FoNFthbwXjuEps+N3Oh2gpl+2NqImngYxMtt6ubTC0Xb3S R7FHTtiwyapRk2qjJ5htZ/rGXOODnGExaio+T0pTOnpvRh1mcC2ccoPfmCRSIgS8AHIZ RkNH/ywdqIroT7i2ASjexDiG/aYj+zllAW63IgkAdtufsU6mFi6EKDzWkON2sVR9ixjM PfQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773882683; x=1774487483; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=KtOL0tajoidjvetUDYT0EZHm3fDU6nhnkE0au786X5c=; b=Zl8qyylc8Z8Hqzt0LmgK+SFHeYW+5Ntwev/w/QvXwYguQqMdEoFdUzi34PbjVVFHNy /dGYVhkyr3OQfN6ddGRdf5HIA5rmPyoGIjqYkTwPmFZBgtwFgEQJS003y4xc/c4TsJ4+ cNYxRxIXWN6OSJddPS2PWUz/ApKS0xwaiFf7iHIS7CuatvzP5dUPJklPHH7WipSfBanX CWozfiGSWdmBQZNxNle/vALN4JoZ1ZFZfoWgnaMqCG1m7rRWfoGCxDSTwEYYAK69DUhq oF1IDEYiB6SBp1o5w4ZePOpdaeBalpOpmWsjrQiOUFg5FjZ0ie0CmxtBI3OE+VPCzK3A pX/A== X-Forwarded-Encrypted: i=1; AJvYcCUdXR6Off9jWRaBCJ0Lp71JnnNV2kDztBi0XcKW/RrtGgUHhxY85QnlQYrLtdCcMshqFZT4zupnF8De@lists.postgresql.org X-Gm-Message-State: AOJu0Yw9sHSJbOKJZJRRUGUmq2reYGududmYTbrblojY+D8H14ElLM3Z FanJj1HL5vVxWo8HRZCU+8SQl7Tcj8Sj5+9q37cLtWBTp1oMqtkU0fxtHWc5PlLz+6NRKQ5cILy qSx0MWkhheYrSOMPjBlPXOpdl4UesF7s= X-Gm-Gg: ATEYQzysV0WP163m6p0t3TF33A1RdyUepFyPLPBlHTyezxn7G+V+CSmbO7SNNkzWzAS U7b6ZZfmof5KOTw7NRu61DKHBOLDGZ1/mfrNRXPRQmKHyPn0mkLGZZDJN/rgrlhi4y3TQ1rwWVs QWCEtVJX/J42eMp0KHsuZkouhqB+UrXg2J1SWMmhQIiQmQo5L/Uf20TA9a6N99UDkwcyeZJMNUF ByGFh7TdA5MHr8Mi91V+/jT+U4ujdgHmxsVuwLg/jlL/Hc7msl2ZvSSQaVfuvKL7BsojydjYKHl HV99E/HIsq+MTg== X-Received: by 2002:a17:907:8990:b0:b98:1b18:782f with SMTP id a640c23a62f3a-b981b1885f5mr25170866b.37.1773882682881; Wed, 18 Mar 2026 18:11:22 -0700 (PDT) MIME-Version: 1.0 References: <19435-3cc1a87f291129f1@postgresql.org> In-Reply-To: From: Tender Wang Date: Thu, 19 Mar 2026 09:11:10 +0800 X-Gm-Features: AaiRm50n_D0PTJRRZrZTGxUD_up5FvhxIuEr9rQ_FzUY21Inw7BTgazpnddsXVc Message-ID: Subject: Re: BUG #19435: Error: "No relation entry for relid 2" Triggered by Complex Join with Self-Referencing Tables To: Alexander Korotkov Cc: Andrei Lepikhov , Kirill Reshke , Fujii Masao , ammmkilo@163.com, pgsql-bugs@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alexander Korotkov =E4=BA=8E2026=E5=B9=B43=E6=9C=881= 8=E6=97=A5=E5=91=A8=E4=B8=89 22:38=E5=86=99=E9=81=93=EF=BC=9A > > On Wed, Mar 18, 2026 at 3:31=E2=80=AFPM Andrei Lepikhov wrote: > > On 18/3/26 13:21, Alexander Korotkov wrote: > > > On Wed, Mar 18, 2026 at 2:18=E2=80=AFPM Andrei Lepikhov wrote: > > >> What is the reason for the second change? Tender, can you show us ho= w to > > >> reproduce the issue so we can support your update to > > >> restrict_infos_logically_equal? If we include it, we should add a te= st. > > > > > > I think Tender already shown this in [1]. The same qual is present > > > twice in the plan. > > Got it. I suggest making this a separate commit to keep the history > > clear. Let me share a draft with a test case for the bug fix first. > > Yes, I was also thinking about splitting this into two distinct > commit. The patch you've attached looks good for me. I'm going to > push and backpatch it if no objections. And let's continue the > investigation on restrict_infos_logically_equal(). Agree. And the patch seems to have forgotten to add "Reported by". --=20 Thanks, Tender Wang