Re: Fix crash when non-creator being an iteration on shared radix tree
John Naylor <johncnaylorls@gmail.com>
From: John Naylor <johncnaylorls@gmail.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2025-01-06T06:40:39Z
Lists: pgsql-hackers
On Thu, Dec 26, 2024 at 11:59 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > The three patches look good to me. Thanks for looking! I've pushed them all. (The failure in drongo seems like an unrelated glitch.) > > 4. For local memory, an allocated "control object" serves no real > > purpose and wastes a few cycles on every access. I'm not sure it > > matters that much as a future micro-optimization, but I mention it > > here because if we did start allocating outer structs in the callers > > context, embedding would also remove the need to pfree it. > > Using an allocated "control object" can simplify the codes for local > and shared trees. We cannot embed the control object into > RT_RADIX_TREE in shared cases. I agree to embed the control data if we > can implement that cleanly. I tried this and it was fairly trivial to get working, but it didn't have the intended effect so I'll leave it alone. -- John Naylor Amazon Web Services
Commits
-
radixtree: Fix crash when non-creator begins iteration over shared tree.
- 9af2b3435844 17.3 landed
-
Always use the caller-provided context for radix tree leaves
- 3e70da2781e8 18.0 landed
-
Get rid of radix tree's general purpose memory context
- e8a6f1f908d0 18.0 landed
-
Use caller's memory context for radix tree iteration state
- 960013f2a1f9 18.0 landed