Re: BUG #18830: ExecInitMerge Segfault on MERGE
amit <amitlangote09@gmail.com>
From: Amit Langote <amitlangote09@gmail.com>
To: Tender Wang <tndrwang@gmail.com>
Cc: tharakan@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2025-03-04T11:51:25Z
Lists: pgsql-bugs
On Mon, Mar 3, 2025 at 9:16 PM Tender Wang <tndrwang@gmail.com> wrote: > nrels = list_length(resultRelations); > ... > mtstate->resultRelInfo = (ResultRelInfo *) > palloc(nrels * sizeof(ResultRelInfo)); > > The memory of mtstate->resultRelInfo point to is undefined. When we access its memory in ExecInitMerge(), This needs to be fixed saparately. > relationDesc = RelationGetDescr(resultRelInfo->ri_RelationDesc); > > crash happened. Do you have a case where this access to undefined ModifyTableState.resultRelInfo occurs? I would have thought that it should not happen. -- Thanks, Amit Langote
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Ensure first ModifyTable rel initialized if all are pruned
- 28317de723b6 18.0 landed
-
Don't lock partitions pruned by initial pruning
- 525392d5727f 18.0 cited
-
Fix an oversight in cbc127917 to handle MERGE correctly
- 75dfde13639a 18.0 cited
-
Remove some unnecessary fields from Plan trees.
- 52ed730d511b 12.0 cited