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 1w2s2Z-000gWp-0u for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Mar 2026 14:38:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2s2Y-00Bbip-0X for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Mar 2026 14:38:30 +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.96) (envelope-from ) id 1w2s2X-00Bbig-2u for pgsql-bugs@lists.postgresql.org; Wed, 18 Mar 2026 14:38:29 +0000 Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w2s2U-00000000NCN-390h for pgsql-bugs@lists.postgresql.org; Wed, 18 Mar 2026 14:38:29 +0000 Received: by mail-ot1-x32f.google.com with SMTP id 46e09a7af769-7d75371d873so7426149a34.3 for ; Wed, 18 Mar 2026 07:38:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773844708; cv=none; d=google.com; s=arc-20240605; b=CnaYMkbtjYcszLa8h4Pc8XZlQ3N29kenM9PV3gAmQQlLzLTZ+PYYPwVmLqgEOJE00E HNxbHTvcl8YATCqRmnaVY+xg4CGZh1hfSWU36bBlDo4LZPAAes5PGSwpvk6NoBOALiiV z8CtroJr0MidtRRwfLsVDvB6z5wUTxblMTtErsxrCHiSctqAqWgCwDJDJWnSD39aomgC Wx74Ao7q1tkN0BbmYROjSmdZ4lY5rCBts4Xb6lf4kOqcLajFIVN3pzd/GNRzyAaRM7KO u75kuoe+gbVvNAZvdib+j+DSdp1UPcAQJSjd4pS7mGQky99MAXLEmsQ1mjgC7ukQG0U5 9egQ== 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=iL/7q3EisSlxzFjUkJXLqrmsbAJJC4fucBvesQTz/dg=; fh=0FJbDIT3rkcGaxFqnH+yWvlQCEErDvxCSPVpALqObN8=; b=enPYWS3H+ER9HCIFgBU3ZneqLW20USA1tz9kNuq2/QGfD2rhtSlxN1qCHJff5Pn+I/ TdJQPZcYODXEnzZhCDVVXqGu40PXygCDyPxy1BWbUA1sdroNx+hMziJHAX98OqCsWLWN NwrsPy/t7OS0dT5rGIQFj5ByZQ3TTHUbpEsQHoG0utz1J52MMjkl7Cdg1GIVnGN3rdwr 6CucOYkTqupDVxnWn7qyKEJHoO2Skb3cV98+Zfg6JCOHgxEmCR+n/dpPfllGpMV3G9aU Vqo9z6Fy+naU9B6putGatPkUIqR0cSlpHXj71HIIHDfy2yY1LIs2if5Pua7Ti7jua5n9 vZCg==; 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=1773844708; x=1774449508; 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=iL/7q3EisSlxzFjUkJXLqrmsbAJJC4fucBvesQTz/dg=; b=c6N8N6Jv0Jdqz++WRa7ih0GHls+cckTYkHtTcOdkybcU1MviY81cEM4g3djpVrp2rs ZZHgYb0qrwhk/hxDyD3NWfhcN6htSe5vk6zzyeBQLboz4hcjEXjuwT+UU+Ut0sZRS/1c eEyzgdovlPuQQRaXE/bHKTDPGBwphfj2o+hE6cckFyt3u33FRvYBhLCRhEcFYvVYyDDA HiaaQ7LYUbh1cd4MHAcA63gy9eYOe658zFaIv103zqZ8UyW7r6lu4t1W+nj22psR/nJz UTyIKCNcCl0RnoiFR04ygvYmruVitCVqxXztjGF1LwtV+ubaOjdPz+O1vv7pGHyalICF LjiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773844708; x=1774449508; 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=iL/7q3EisSlxzFjUkJXLqrmsbAJJC4fucBvesQTz/dg=; b=dfzYcuajkV6siJJRxvFqao0hLmi6kpoYLz8R7PtGjtBX4qpmUU5B/cv3GujkWUG60K rQWhgmelWbtc6/uipmFN1/QQWXp91mzeWgoz1K1ll1+3+MYB94RNL/lqYPyF9eD8QkZ5 nOhZWd8rxqtJd1rpPN72PXDe1Vj7vhTg7Ci7fJjgQyrnOuiSnT479mSeeSYoHUFG0d+Y gkTBS74HcztYkq1nz7B5ZZWeN/NLrIv2uPmNcC944bXOfBkkjTSeSRYR5inaJwokWnNj gjCQQgYwTDQlnqCRueK9cqDSTHTX9iLY02iR0+eUXYiGJYlKdbBthIdUuebnEUJ/AHuE 6+uw== X-Forwarded-Encrypted: i=1; AJvYcCX/boy4Pm0TIgU2f+p73F4T7zWROjfVJwCjtmPVOH6dZTrgRysGpcb2LKUlFVBs/qhhMywieLr1tJfU@lists.postgresql.org X-Gm-Message-State: AOJu0YwwHPnafAWqAsaToSVdHBIMJNiHleJOB/wBABVEOOs/EzcstT3W 24UV6iumO1UGlHBFQnwwgeJifIK/bZxjQpDGdBsjR/e9pkEr6HimlBtLFfPZpvur4CHrnRkRVSS FysLU85VY/CBCp7voaTC+Sh2RdjsgvrE= X-Gm-Gg: ATEYQzwKCB3l8LXYIWkMzh3h7iAZhchDO5USxCG+o1QEzojfSdIbdil8AicoDt6o84W YOM41tnqi/AYc2BvpFvROYMFd/Ez6d+HLIVuoFBqJ7Rybvl/JY9y9OCq/bmy88+4rXHjvBtG+IU s6bBV3Bf5J0xj+At27jTNdYmlHoDUUsleiwlLqlskwPMpno8iaY7urvEwAw2mM+5PvlCpVWavQR wgQjvSvqVtJCbxdkb3if0E8HRFzYB/1KPLAsCP3FcmBy4MKd43Dsb0mRATwpT7I37RY/WQkEDAJ uZgGnQ3Af11mWFhq2jgG00zofgjnV7tyyVxLfNFD3ZN8t8jEOKE4eCOS5PdJIKrkDZdXceW0ie5 aPMOrHQRlpNXe1c0rqUMZDwJM4o8OlfK8QeAX9Y1RmjZDfwR36/w= X-Received: by 2002:a05:6820:88b:b0:67b:b9d8:a17a with SMTP id 006d021491bc7-67c0db38cecmr2400114eaf.63.1773844707569; Wed, 18 Mar 2026 07:38:27 -0700 (PDT) MIME-Version: 1.0 References: <19435-3cc1a87f291129f1@postgresql.org> In-Reply-To: From: Alexander Korotkov Date: Wed, 18 Mar 2026 16:38:15 +0200 X-Gm-Features: AaiRm511kjwsm-YsqVtA7H8c8PgZ1QXJ3UXTAzXoWiWzT8kdceB7W0eSTppylVw Message-ID: Subject: Re: BUG #19435: Error: "No relation entry for relid 2" Triggered by Complex Join with Self-Referencing Tables To: Andrei Lepikhov Cc: Tender Wang , 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 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 how = to > >> reproduce the issue so we can support your update to > >> restrict_infos_logically_equal? If we include it, we should add a test= . > > > > 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(). ------ Regards, Alexander Korotkov Supabase