Re: Bug in row_number() optimization
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Sergey Shinderuk <s.shinderuk@postgrespro.ru>,
Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>,
David Rowley <drowley@postgresql.org>
Date: 2022-12-05T04:39:37Z
Lists: pgsql-hackers
Attachments
- windowagg_fix_v3.patch (text/plain) patch v3
On Thu, 1 Dec 2022 at 21:18, Richard Guo <guofenglinux@gmail.com> wrote: >> + if (!func_strict(opexpr->opfuncid)) >> + return false; >> >> Should return true instead? > > > Yeah, you're right. This should be a thinko. Yeah, oops. That's wrong. I've adjusted that in the attached. I'm keen to move along and push the fix for this bug. If there are no objections to the method in the attached and also adding the restriction to limit the optimization to only working with strict OpExprs, then I'm going to push this, likely about 24 hours from now. David
Commits
-
Fix 32-bit build dangling pointer issue in WindowAgg
- 2a535620cec5 15.2 landed
- a8583272218a 16.0 landed
-
Teach planner and executor about monotonic window funcs
- 9d9c02ccd1ae 15.0 cited