Re: A very quick observation of dangling pointers in Postgres pathlists
Andrei Lepikhov <lepihov@gmail.com>
From: Andrei Lepikhov <lepihov@gmail.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Tom Lane <tgl@sss.pgh.pa.us>
Date: 2026-04-29T12:43:02Z
Lists: pgsql-hackers
Attachments
- v1-0001-Fix-dangling-Path-pointers-when-sharing-paths-acr.patch (text/plain) patch v1-0001
On 27/04/2026 10:19, Andrei Lepikhov wrote: > On 21/04/2026 10:35, David Rowley wrote: >> IMO, we should write a function like copy_path() or reparent_path(), >> which creates a copy of the given Path, or the latter also would copy >> then set the ->parent to the given RelOptInfo. Any time we use a path >> directly from the pathlist of another RelOptInfo, we should reparent >> or copy it. We could add an Assert in add_path() to check the new path >> has the correct parent to help us find the places where we forget to >> do this. > > I've attached the patch so we can keep the discussion going. While playing with random path choices [1], I found additional cases where a path is assigned to two different RelOptInfos. See the attachment for a modified patch. [1] https://github.com/danolivo/pg-chaos-test -- regards, Andrei Lepikhov, pgEdge
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Let Parallel Append over simple UNION ALL have partial subpaths.
- 0927d2f46ddd 11.0 cited