Re: v16dev: invalid memory alloc request size 8488348128
Justin Pryzby <pryzby@telsasoft.com>
From: Justin Pryzby <pryzby@telsasoft.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: pgsql-hackers@postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2023-04-15T23:19:04Z
Lists: pgsql-hackers
Attachments
- postgresql-2023-04-14_202642.log.txt (text/plain)
On Sat, Apr 15, 2023 at 11:33:58AM +1200, David Rowley wrote: > On Sat, 15 Apr 2023 at 10:48, Justin Pryzby <pryzby@telsasoft.com> wrote: > > > > On Sat, Apr 15, 2023 at 10:04:52AM +1200, David Rowley wrote: > > > Which aggregate function is being called here? Is it a custom > > > aggregate written in C, by any chance? > > > > That function is not an aggregate: > > There's an aggregate somewhere as indicated by this fragment from the > stack trace: > > > #12 project_aggregates (aggstate=aggstate@entry=0x607200070d38) at ../src/backend/executor/nodeAgg.c:1377 > > #13 0x0000000000903eb6 in agg_retrieve_direct (aggstate=aggstate@entry=0x607200070d38) at ../src/backend/executor/nodeAgg.c:2520 > > #14 0x0000000000904074 in ExecAgg (pstate=0x607200070d38) at ../src/backend/executor/nodeAgg.c:2172 > > Any chance you could try and come up with a minimal reproducer? You > have access to see which aggregates are being used here and what data > types are being given to them and then what's being done with the > return value of that aggregate that's causing the crash. Maybe you > can still get the crash if you mock up some data to aggregate and > strip out the guts from the plpgsql functions that we're crashing on? Try this
Commits
-
Ensure result of an aggregate's finalfunc is made read-only.
- 78d5952dd0e6 16.0 landed
-
Remove uses of MemoryContextContains in nodeAgg.c and nodeWindowAgg.c.
- 42b746d4c982 16.0 cited
-
Fix pg_upgrade to detect non-upgradable anyarray usages.
- 09878cdd489f 16.0 cited
-
Work around cross-version-upgrade issues created by commit 9e38c2bb5.
- 97f73a978fc1 14.0 cited
-
Declare assorted array functions using anycompatible not anyelement.
- 9e38c2bb5093 14.0 cited