Re: BUG #17777: An assert failed in nodeWindowAgg.c
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: xinwen@stu.scu.edu.cn, pgsql-bugs@lists.postgresql.org,
David Rowley <david.rowley@2ndquadrant.com>
Date: 2023-02-10T23:12:32Z
Lists: pgsql-bugs
Andres Freund <andres@anarazel.de> writes: > The problem is that normally we supress the moving aggregate optimization if a > volatile function is contained in the filter. But unfortunately, > contain_volatile_functions() doesn't descend into subplans. So we don't see > the volatile expression. I would say that if a volatile function in the argument crashes things, that's an executor bug. You won't get any sympathy from me for complaints about whether contain_volatile_functions noticed that, because *immutability markings can be lies*. It is not acceptable to crash if they're wrong. It looks to me like maybe we could just remove the Assert and do - if (peraggstate->transValueCount == 1) + if (peraggstate->transValueCount < 2) a few lines further down? I've not dug into the details though. regards, tom lane
Commits
-
Disable WindowAgg inverse transitions when subplans are present
- 836c31ba508c 16.0 landed
- a9fa6d79aded 15.3 landed
- 4aa43ba21846 14.8 landed
- 301eb3ee4ecd 13.11 landed
- ac55abd33537 12.15 landed
- 8d2a8581b6d6 11.20 landed