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 1wgySx-006Wic-0G for pgsql-bugs@arkaria.postgresql.org; Tue, 07 Jul 2026 05:35: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 1wgySv-004UFx-2L for pgsql-bugs@arkaria.postgresql.org; Tue, 07 Jul 2026 05:35:29 +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 1wgySv-004UFk-1X for pgsql-bugs@lists.postgresql.org; Tue, 07 Jul 2026 05:35:29 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wgySt-00000002Bba-2Okv for pgsql-bugs@lists.postgresql.org; Tue, 07 Jul 2026 05:35:29 +0000 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-4758b2a9e2aso2286101f8f.2 for ; Mon, 06 Jul 2026 22:35:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1783402526; cv=none; d=google.com; s=arc-20260327; b=Oucwx3poPLYjz2TLqyfBXOP3nP7K99lyGvpmc5+rzbcq88t4CImVIuMqL6cph1Bhiq WO1UH4FCl6ITNA3Yh+MSI+cZtYQSQJ3fhkQBqsNi+ldWoL87hptyF/alKm3UwTWglMAo HXD753WiaqGSO5vJZkcyB/HedfkheOS+3tYSMIp3dGk/xpaTH6ueQBJEhOj3SkMfNvcY lrZ/tX7X3ldNku+mvb7i4D45iw+K53ZxpRkPQNE5qhKNDL53T21cAzXYfjFZZU2xkccT MZxghq0VrQUPH7Rs5d+jZJIO5zDPobIk/+RG+2fYkGW12JNzJT3ysCysKXBtSCEqj0/3 5XNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=So9iWrUO//dhN4VUYcth55WPWlI6nd7PjBc4S76/VXg=; fh=huuBEntTCy25VXmmJ2/u1f2e2N8NXiadZRfVEeUvR58=; b=KyaLLHXg18exX+ANHqf8RG+OABPQbjPkn9oTam0dbQlIvcOm81FHNHQd0kZ5b7/KT/ 9frJwSm+gt4UdC3Eni6yHFFWmHUeN7b+7Z0snzFBTVaclGadEfGrfCvaP7EhxWsmFmvE sWNzaiwU58J2TLHdgjDTXmosFKZXFJ/9GDB1iVO49tWtJ3u1CHF+Z5pUa1gXSLk8iXzb btG+S4CeXJvDWNd5V+CAGHRq8UJesdQwfsva9gpgD2eSoH079KZqtNKT/zOTnDVqDfau /9D6vR3f8HaszJEMqg+8ItuojxT09QfKuWGTfx/q1dX9/Cv+fR5fM97i/INjpSqgu0xD I8sw==; 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=1783402526; x=1784007326; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=So9iWrUO//dhN4VUYcth55WPWlI6nd7PjBc4S76/VXg=; b=eoxPFL6cyNrhzWy+tt0mVwmUO7aHsW3cISBFzNU/09atQo3LLKOjOvMnVkx8zx/BoZ 7TxHd3uav+6SLgJx7PdbYRXyVMld5BzgC5WdHrcoDJyWcq4y3vJpULb84ZHov71/sMts 7fVsDOXwSchBl8GBnf7i/epTkAzbAnDe0JFHObDH2JMOtI6ROydGtWSAX+GocOlxS6JQ xsWg+ZsXNqBotnPv+McXfusdAdi3FU/eRBj+U2ljHM3gMTVI6PdTrN9+TXlNl85+tfVa NuRqhRszg1eO+yno+b+WoOO1WP0PqueOrIbufY3p0Af9JQ52G4MTcI7eeDqVtUOBMc0I FL1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783402526; x=1784007326; h=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=So9iWrUO//dhN4VUYcth55WPWlI6nd7PjBc4S76/VXg=; b=YamJkDFJITXrGXAt626e0cK3Hf41lEgLrPj2lYqKrtLfF7ZAKh2dhinWtK5Gu88l35 CAU1ot7YC1f6utiq+Uzk0UURWqpmHGtARKeeBEzQt7KwTSdsWW77HdMYb0MUSwI1BnDQ pnxJQOB8Ex0mk6rgk39ay5DzTvTDSuXx/PqWcVK6pYgYCd8stwwkHpiyURo3dvtTb4Z2 yqgP/WARutE4lT1mTJFiWOWEirowX85DzIVxLpFLmjmmJZ00tRzWt7LQlaYaXZcP/9+H 6OF0TL2Nehnei4KcigUYBbWygNI6C06OP1MxI/CKrkE/p2cCd8kDuiTKBMNx1hVBmwQ+ 1KSw== X-Forwarded-Encrypted: i=1; AHgh+RpZ3mv9qhJPAIcnhGSTcBd4Zjh2Y5ME2NWyy4vn9YMwk5Y7bIVEEgQRHdwlf21ykZL/Wxp8ALeXkoHw@lists.postgresql.org X-Gm-Message-State: AOJu0YyGKURAX3/OuV3ifp2tyYyzWaE4RmHmE9ytQGhFmbRzThIj2xGY /q4OFjN+rtrz4mq2rzQQgG2DMhliuPumoa0eSkHJ+rcthIoxWs62ld0N01+xNb2Ssyan/QDhNqz TSBGGUiI4CXA9myK6+5iWh0hjeQUAZl0= X-Gm-Gg: AfdE7cknQFlS60TP8u8KdUYpujEMc/lIi/R4qsLfFFiLx4JnmCZlRHvSJDEkfJc3aIL FFLb8rmkmlsldBBq7NAR7H3CD3EY82FO5Rl1oCwQVitYgrsthKfzJV/zAZQluBDIAUNyNlsFkBu GpP3+RwBROMqTxMWqbtaUoZBlajqViCKTEg1pXCB9ox0dxzQ8iuqQdQEVotDh2eaDGnL/ixrX8t 6YrTKsMToZ+sA5ZuLbsj7ig+IFf++yk68xCmbB2SXod64o6Tv0GAiTmiqb2t0iv3adXMJyCMbYB Sf2uNleXBjaXDKKMq1yP8KDkUzchDfJHgrGBzOSMhv7JCZ/fAaHCKCY+l3ElTVY= X-Received: by 2002:a05:600c:548d:b0:493:c478:8744 with SMTP id 5b1f17b1804b1-493df0644a7mr36796655e9.18.1783402525883; Mon, 06 Jul 2026 22:35:25 -0700 (PDT) MIME-Version: 1.0 References: <19533-413a1014e5d0e766@postgresql.org> In-Reply-To: From: David Rowley Date: Tue, 7 Jul 2026 17:35:13 +1200 X-Gm-Features: AVVi8Cf8jlYCVm-N-qTFY2RtelH0cnl1atRhJsxowMqBpBLKhkqrlPkSm10Q4KQ Message-ID: Subject: Re: BUG #19533: Wrong results from WindowAgg run-condition pushdown on count() with EXCLUDE CURRENT ROW To: John Naylor Cc: Chengpeng Yan , Richard Guo , "imchifan@163.com" , "pgsql-bugs@lists.postgresql.org" Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 7 Jul 2026 at 17:11, John Naylor wrote: > - /* No ORDER BY clause then all rows are peers */ > ... > + /* No ORDER BY clause and RANGE mode means all rows are peers. */ > > Was the old comment wrong? Or are all rows still peers, but that's not > sufficient to show monotonicity? The test needed to be updated because detecting monotonically increasing and decreasing in ROWS mode wasn't correct. The comment got updated along with the test. David