From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: xinwen@stu.scu.edu.cn, pgsql-bugs@lists.postgresql.org, David Rowley <dgrowleyml@gmail.com>
Subject: Re: BUG #17777: An assert failed in nodeWindowAgg.c
Date: Fri, 10 Feb 2023 16:49:40 -0800
Message-ID: <20230211004940.t5l2dz7rnss76zao@awork3.anarazel.de> (raw)
In-Reply-To: <443909.1676073430@sss.pgh.pa.us>
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>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: andres@anarazel.de, tgl@sss.pgh.pa.us, dgrowleyml@gmail.com
Subject: Re: BUG #17777: An assert failed in nodeWindowAgg.c
In-Reply-To: <20230211004940.t5l2dz7rnss76zao@awork3.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox