Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pQe5Z-0007ku-9g for pgsql-bugs@arkaria.postgresql.org; Sat, 11 Feb 2023 00:50:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pQe5W-0004vA-VQ for pgsql-bugs@arkaria.postgresql.org; Sat, 11 Feb 2023 00:49:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pQe5V-0004uv-CO for pgsql-bugs@lists.postgresql.org; Sat, 11 Feb 2023 00:49:58 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pQe5M-0001Jg-Sf for pgsql-bugs@lists.postgresql.org; Sat, 11 Feb 2023 00:49:56 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 1466A32004CE; Fri, 10 Feb 2023 19:49:45 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 10 Feb 2023 19:49:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1676076584; x=1676162984; bh=H1att+Ez9G yV3pKGQMwMs8ImpNV3JNshbiTGGRyGHiw=; b=fUGfIM8Hqr9XSTZRZgjL5P9CQt MGw6M/8+bLE24E5rkMmEbO5zT1xBaoP4qb72F4tt+fUeGdakdNP+0PEyZAV1Kxrb 1HmocI/tJFl0fWY9WL0bTOvCdt0tbRq1J7JKlJKi6KV8d2ekUTuw1Cf+M7xFrr5z 0AYBnFy0LzEw7UrS/BUeMnnD0StqjkX3vl4wDkhS/ERBF+Mgljq/Ou5qkbWYkCyf jAsqhHYa+a9R81q8N4Gmr0om0ydesZfZ2r+bssL9nKY7SFTIbS7tq0kP8rXZ3kCr VBCKIJmdbOcYVA5jXCdo1R0ShHJ5II2/JLeysGJ8TfslbWdjJPRCiVjLHRHw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1676076584; x=1676162984; bh=H1att+Ez9GyV3pKGQMwMs8ImpNV3 JNshbiTGGRyGHiw=; b=gneZXTpMAEdambB5CPcmftHyoRdmzKzH4Czz9PtnFneU AVDSdgEWApvqP/J8UO/chhR+b0Rge/ZWJvmCaueyF0F+T7VPpXRpq60BVIrLmoC3 uPl+PWzDMMkkrVuTr1dDwXnntmZmqRQU9VTMfcjdCqnd2cLXO2yVQ6T7RS5BAtTO Yv5nvDwpzwKCRAnLFAf17GBMuO+4Zkmbwd+jDcKPZ3UK9qmDVc4ni1xa5uvQOd3k PJy6FUeCT91TPxw2TNTXSD0eOH1FngIUicZnimQ91goPckcrydb5YYvlmQWFlU/L IKPesui76EDlmzvhjEyWZwSZJGaAUfTlAySIPOmwmQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudehiedgvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvvefukfhfgggtuggjsehttd ertddttddvnecuhfhrohhmpeetnhgurhgvshcuhfhrvghunhguuceorghnughrvghssegr nhgrrhgriigvlhdruggvqeenucggtffrrghtthgvrhhnpedvffefvefhteevffegieetfe fhtddvffejvefhueetgeeludehteevudeitedtudenucevlhhushhtvghrufhiiigvpedt necurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 10 Feb 2023 19:49:42 -0500 (EST) Date: Fri, 10 Feb 2023 16:49:40 -0800 From: Andres Freund To: Tom Lane Cc: xinwen@stu.scu.edu.cn, pgsql-bugs@lists.postgresql.org, David Rowley Subject: Re: BUG #17777: An assert failed in nodeWindowAgg.c Message-ID: <20230211004940.t5l2dz7rnss76zao@awork3.anarazel.de> References: <17777-860b739b6efde977@postgresql.org> <20230210230230.scuk6gqrks6c7sc7@awork3.anarazel.de> <439391.1676070752@sss.pgh.pa.us> <20230210232051.efjhtoqo6odk3gke@awork3.anarazel.de> <443909.1676073430@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <443909.1676073430@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2023-02-10 18:57:10 -0500, Tom Lane wrote: > I might be more excited about it if there were a visible use-case > for volatile filter expressions, but I can't see one. The presented > test case is obviously just a fuzzer, not a useful query. I don't care about the performance of such a query, but it doesn't seem great that the defense that we do have, doesn't work. It's not like we don't have a fallback execution path, it's just that we don't know that we have to use it. Do you think all other uses of contain_volatile_functions() (and it looks like contain_mutable_functions()) are fine with not detecting volatility in subplans? I don't think it's common, but I don't think it's crazy to have a volatile function somewhere within an aggregate. pg_current_wal_lsn(), clock_timestamp(), pg_relation_size() or such. I think we could just add a !contain_subplans() to the code deciding whether it's safe to use the movable window optimization? Greetings, Andres Freund