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 1we1Bg-004Uxm-3B for pgsql-bugs@arkaria.postgresql.org; Mon, 29 Jun 2026 01:53:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1we1Be-000DrN-2P for pgsql-bugs@arkaria.postgresql.org; Mon, 29 Jun 2026 01:53: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 1we1Be-000DrF-1c for pgsql-bugs@lists.postgresql.org; Mon, 29 Jun 2026 01:53:26 +0000 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1we1Bc-00000000iNj-13K9 for pgsql-bugs@lists.postgresql.org; Mon, 29 Jun 2026 01:53:26 +0000 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-697edb1bf6eso4095640a12.1 for ; Sun, 28 Jun 2026 18:53:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782698002; cv=none; d=google.com; s=arc-20260327; b=KwJBYL9+35glyprvpyHt6Fyj4hhiMiOw94VrTpB3D8FwLnct2ru6c+if2y0EGNf3hC wnV9Uth5qmepB/3eNG56DdjGufEd42UXeyxK9c4LGK0EK/QVJ28OGl7NAOhkMWksjmnV 0vaD0/BIFZEf5PQ48UjeSlFdDsDVVHLwSczIip2pEfxrYT2+zYFICMfGHCQZBFl7YH13 kRrOqEkEP+m+BleVNbLt8PJJjO+8nKlIbR5496JmLZ61gltCIRKqA/qG0t0vHtEMGddW 5RKQroxBVjd0VvpDHEAN4HYfgeIuy0Wfj63xFO85738zlogkb3wF/S4ZnCGuvk5kM2qB 6oLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=v+HvKI2m+yI502iEU7y1fpu93B6e6/RHqHFE1s+A4Jo=; fh=RSvhOE+Pe4et63sRyGMyrLXbxj92Dm68CUwwHl5ppgA=; b=I96L8v+ffX0yTKrxPrrkMRGwn06TpEujtA955PwmEWSWd9aV34nULzfN8Qfcdrnb8i XbnIA6gvU4V5eWdhu5E/8PvG+UPYaxRoMWlXsqVIaGKi1Bba4MbBsJRjAVKBxdp+hG71 cd3XDkm5UuuB8GybooKT3AZWo3pIiKOuIlL/1933sX1Em/AVhQIQUy8Iypwbhsil3jXi MNcRnO8pf8xy463NtLdQo2X2Oof6vZm4I4HAzCkkRUOp6r+3s1AkP8oDNZSj02e0Aa/m 3SlsuhNz35IDc1iPUWbM/1BSOQnOaBpfbjNnXMrWXH7I/mdvpz6eNasyqQCLisqC+8I4 BPow==; 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=20251104; t=1782698002; x=1783302802; 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=v+HvKI2m+yI502iEU7y1fpu93B6e6/RHqHFE1s+A4Jo=; b=ek7KEoyW8X76LilQ+JbIiLiCA/ZK+2FMWEjEFufSkgO3KQib/yBGatUNNYO7cxxCJf 7Cnrayv8iAL7oaTHEOfTFkHOfzOaplP4gQAUKyN091ZGURRIhoCApEmK3fOnGoAT93lc n6TVsHc/KzaP5Vaf/72YxrXLd7zILIdUWbfxWRq9RPFlFaj+TCRMJjcYmF7dQGr/OBdT uGXQWj4lE7d6fWuZidoD4YGQeHTplRBWLh4fUCQdm1hgqnxypg5FlcSjnaYmvuzF3Vrb D4adwwyXxqgyEfEUr1ukaeaJLja/GcvJwdiUH5cd7pxD6QoC0s13jqonHC4PvxtQ+om9 Q2cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782698002; x=1783302802; 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=v+HvKI2m+yI502iEU7y1fpu93B6e6/RHqHFE1s+A4Jo=; b=kUKaiOqJlS8RRpre26DkESPKJIFjhppHE98F3AqFnQZrts7PstXg2/Om1zbvrrNjNP aYmtB2hg99IgmXiiwXXWsjbrH44CKaynfzt8Su+urqZP3fjPFCeaHmSsfa6AHhRN9Jku s3z6dnrLvQY0K+b0OPXmnnI9i42Iqb9QRGp0rEu8tHVEUd29Uwnywo1JMDrNzlpwSfkC 7GAYSUH5KGMQKqxXvKdyLI9h3UOCBApcrdFt4+Cr8ivUdbU78wj5/mzEd8K9gwdo1hXR DXn8tr/7YYXeBXr2OnDYgenBwXDJibjwwuTd8welvk6jRiCS6pU6x7+jGrQwuaZqZqOo H7Jg== X-Forwarded-Encrypted: i=1; AHgh+RppqHVe0f3MtRL7THoBxdoQH3EjQOj8/nanuP2g/egF+stdYtCIrGsDxDb066iE3ZJqQ5rP3D95SuTV@lists.postgresql.org X-Gm-Message-State: AOJu0Ywe+gHXFVe5l9CGYU7aKf98TuANOup/eUDaxIapHUjZqATGZZnz XSqowyyD9SKF88kbC2fN6QF939Z9To/QQ9jSiqsmducUv3USi2J+T/WD/2JJx92aqGnLeQY7UbD cFslzK5ireJPDsuijNNsSD+5MLFMCHzk= X-Gm-Gg: AfdE7cmvguoIBa1EQQt80UDdyrbp/MlRPV5O8hWmMuMIseubPoZ7GVMgWx4CqyRRhn8 EFa6OJw/01PYSmCf4z5seZoxwL697pIrqs82qLdgvuc51NTB5VuUzfGE7KGYwzsGi5Gxnb8nw7r qWPLiMhkwTe+0ulf4AcLnQ6RfKMjxI9kAmEH8pewuoHaQBt5dtBjpL5/lTX8i/G5DzzEuOv86sk DGWmS42l+jVcgXm+srACSpQ4pC/FNTpJRA1JEjs8RGEV/wDoSL9tVVjAypD1+A0D0BaK3gLEnHt 3JnuOdwm9xnFQakC97GSVQCNn1Hfnymqt5eLfQ== X-Received: by 2002:a05:6402:321b:b0:697:e97b:777d with SMTP id 4fb4d7f45d1cf-69810aea680mr5913588a12.17.1782698001928; Sun, 28 Jun 2026 18:53:21 -0700 (PDT) MIME-Version: 1.0 References: <19534-9cdf4693c42033da@postgresql.org> <544F3673-0EC9-4440-9FC5-4BB4F0AA3037@outlook.com> In-Reply-To: From: Tender Wang Date: Mon, 29 Jun 2026 09:53:11 +0800 X-Gm-Features: AVVi8CeL8gb4I6KJ2LhTekl3XNslRz4AP8dnppaN51_M-rSRlfCq34Oa7g_Zv8k Message-ID: Subject: Re: BUG #19534: Qual pushdown across a window subquery is unsafe with nondeterministic partition collations To: Richard Guo Cc: Chengpeng Yan , "imchifan@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 Richard Guo =E4=BA=8E2026=E5=B9=B46=E6=9C=8829=E6= =97=A5=E5=91=A8=E4=B8=80 09:41=E5=86=99=E9=81=93=EF=BC=9A > > On Mon, Jun 29, 2026 at 10:23=E2=80=AFAM Tender Wang = wrote: > > The correct result is the most important thing. So I agree with you. > > The fix seems obvious: we should refuse quals pushed down to the > > subquery if the quals contain a nondeterministic partition clause var. > > This class of bug is currently being discussed and addressed on thread > [1]. I suggest we consolidate the discussion there to avoid > duplicating effort. > > [1] https://postgr.es/m/CAMbWs49dHFVVwx9MjYmvUrZu0L4vZTbGVyhj3T2SsWgS1Bzh= zg@mail.gmail.com > I had noticed the thread [1] before writing a patch to fix this issue. But I thought it was a different problem at that time. We can shift our gaze to the thread [1]. It seems it handles all kinds of collation problems. --=20 Thanks, Tender Wang