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 1weLTQ-004joq-2U for pgsql-bugs@arkaria.postgresql.org; Mon, 29 Jun 2026 23:33:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1weLTO-005GLW-2J for pgsql-bugs@arkaria.postgresql.org; Mon, 29 Jun 2026 23:33: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.96) (envelope-from ) id 1weLTO-005GLL-1O for pgsql-bugs@lists.postgresql.org; Mon, 29 Jun 2026 23:33:06 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1weLTL-00000000pWq-0hmV for pgsql-bugs@lists.postgresql.org; Mon, 29 Jun 2026 23:33:05 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-493b966dd74so1030695e9.3 for ; Mon, 29 Jun 2026 16:33:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782775982; cv=none; d=google.com; s=arc-20260327; b=US6Pr3cgzYmwYqQcQfElZVdpWMMp28HTb7YbVP2oVBy0FlLdCkUoQJqPLVNkoSZyUe KMmH3a3kA85gjFtVje3qVJqxcGJjKenxO+c0l3gYErzdIY3U/nRuZlBnBVOQNP89KZ8s vSCCHA3e0uxifNiRchY8ncgAn5DVECwnE7WLiynlnLCqz7evjPkEXUxbAtY4h3e2bHoZ GRk9ddgnCd9tI4pji1nJuguC1kOndk0cYMxjJ6ChY5Hw4HrlZ1M580GxnrCLCtCS226n DkGrYTTFf8f5B/BQWBqMOAr9rNN5DrFwFNH0Kdkqx2kZzSpf94ImX7Adu73642tzX6rP ce6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=pQseEZQLDFbnP0sByGJOpE5hnh61TqDScjQRGilW5/s=; fh=+HqNEAJn1YqZEhTtPlgIaODtf1P1R+etM0ovuRM39ws=; b=EpCT7/xtfPRPLWkgxXggXLQLChq8t8DAXIlNaa/n5hONoo0vUCnAJ/KjLBVb/8YOUY 7ERabJdwv9W2aTWG0QvS9rJqXxqPx0XuqZeMH4fcdPBJqCYgg5Q01FX8ClWGjNLPC74s 1KYiPoTkoCqDCWsFlk7mDarEBWef36kp4LV4I+k2CCU7Bx9hZqNgcl/bYSoBT2Bp4AxS +uRkH8Ig/kYQpd8p63xKnMz/UP+ekA7poWl7XZ6y8JUMDfoKidUkVN6BnPyo0gbGk+Ko PRpvhH4qFY7qK8Hv52WVXN+qH72LouDxHnoXsX4ILDEfSSKu7TJAxb7PVbM8cVk1YLES PCLw==; 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=1782775982; x=1783380782; darn=lists.postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=pQseEZQLDFbnP0sByGJOpE5hnh61TqDScjQRGilW5/s=; b=mjYLrvAIzSyOqfjiUEM5tpK9cYfYgNfteE/2DzyGLIJ5ChRLtzvegHPac2sVOWmy91 p0D9KwsFnHw+B7iQm9K7snNtN3XZQ3evDjGOYGW6CHploqK4l/lbXz09017X3xWjiMkr jBOAR9laZxQzV5iOg+ULf3vwhNfkcYtcJ31NroRXCTdNouzttt89aNQcjiSlyA/nEWdN l61O5r4ULGcxce2Im9EjcMQvITqz+IsfWE82VPv4HSS5O0Bn8VcucWt9UQks2LP8LqCx hqrrsqCSIteYf1Ff/WibpnFgxJCFDPCzWKiJwJek2bCtWJ/PMjJklmxoN3HbXcEJ6bEx OoOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782775982; x=1783380782; h=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=pQseEZQLDFbnP0sByGJOpE5hnh61TqDScjQRGilW5/s=; b=WRykcCqbFeBWdEenf5oVnpVj9KXzWuiqVrC7gGfpvQFKLjxpOBi+7KetneAEG9c2QX KfwmI7q8nbRwUChvL017EHFjBNaQ8pIyQcV6xLXJ/GG3pBhqP1O6lWkpTyZLm0uravj8 ezmENI5mAxXzEWbd9VxlfeqlmeBerOAAqBtuZupWUyZqTLYOOGboZn/izjtMUp3Gm3b4 LBe2wpZzxHSWwkwXCCh0gOIQN+vaPGd0Rj2p8XrklK/gnG7SxgSDRwKbMRYOkeJbcCZP BU58biiielWzFhx6I3Vc0afxMe+u2/pNVBTDGfCDczbyvFejVtVl1Twx86ieHtwKD3qZ vqrg== X-Forwarded-Encrypted: i=1; AFNElJ+LlTNCFt8hKYOgflbhb7g5gih8zLrXW9I1bJQjHVZmAYJXr5IH4gnAffcph+qadrdMXaNhCZH5enTp@lists.postgresql.org X-Gm-Message-State: AOJu0Yz8XNHvz0wA9qR0XVOktAqsTQclwssjnqG/xVGawFrwwhHGXGMq JhpgfOcdz5JGaOGmAV9lellryDsdSnGa3rXpW9tT6l8EjIpbzTuxYbdRXmfyb7OrPqTvfQtIuvE L9ppxuhOOLytipmd0jxX9xfOEQYWIUTM= X-Gm-Gg: AfdE7clbz4KMa2BU85mnC3tcLXyzEk+MFoW3mqDPXufs5LA037t6yl4Po0wERZe+uqu TAtw6d/csCy4CE5qACkfnyYXf1thNe7vkDKQ0syFdeInYJWVmry1MNuWPg40EtFOxjA6ddfCDoM ndaeIQa+qlyxttbRQ/NzNkwz1wFQ6z92eZewktEPRyhhMkwSf9TDZ0UKR+s+SdpacilAyKJjl26 6/vl/6Ocn8IU0fOPbWTzPi32ab2BcG5J1U7D+EcNRXtebleRGRSw5hRcCyV4Jh1oGUZSPw7xA6y 3taY9E5dLtqMWEmTdGdVie9eNwuQ6eJbZwZu9rNoLLJGWImVNJh6OLFpxA5mgzC/M2ZVYdvm9g= = X-Received: by 2002:a05:600c:6016:b0:493:b6ee:fcb7 with SMTP id 5b1f17b1804b1-493b828cb3dmr14953975e9.14.1782775981619; Mon, 29 Jun 2026 16:33:01 -0700 (PDT) MIME-Version: 1.0 References: <19535-376081d7cc07c86d@postgresql.org> In-Reply-To: <19535-376081d7cc07c86d@postgresql.org> From: David Rowley Date: Tue, 30 Jun 2026 11:32:52 +1200 X-Gm-Features: AVVi8CfExK3t4oWRf7VUPQqTHcyBSwKUahEH5pCMFfOcuVnIyEKnxUSuoQmkA5E Message-ID: Subject: Re: BUG #19535: Splitting window input targets can break same-level SRF lockstep semantics To: 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 Sun, 28 Jun 2026 at 00:55, PG Bug reporting form wrote: > ## Actual Behavior > > The query returns four rows instead of two: > > ```text > 1 | 1 | 11 > 1 | 1 | 12 > 1 | 2 | 11 > 1 | 2 | 12 > ``` > > The plan shows one `ProjectSet` below `WindowAgg` and another above it, > which breaks same-level SRF lockstep semantics. Thanks for the report. This is the same as what was discussed in bug #17502. There was a patch there to disallow SRFs in the WindowClause. I believe it was intended to go into master only, but that wasn't done. David [1] https://postgr.es/m/flat/17502-281a7aaacfaa872a%40postgresql.org