Re: BUG #17777: An assert failed in nodeWindowAgg.c

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: xinwen(at)stu(dot)scu(dot)edu(dot)cn, pgsql-bugs(at)lists(dot)postgresql(dot)org, David Rowley <dgrowleyml(at)gmail(dot)com>
Subject: Re: BUG #17777: An assert failed in nodeWindowAgg.c
Date: 2023-02-11 00:49:40
Message-ID: 20230211004940.t5l2dz7rnss76zao@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2023-02-11 01:08:09 Re: BUG #17777: An assert failed in nodeWindowAgg.c
Previous Message Jacob Champion 2023-02-11 00:13:07 Re: BUG #17760: SCRAM authentication fails with "modern" (rsassaPss signature) server certificate