Re: pg_plan_advice - Mailing list pgsql-hackers

From Robert Haas
Subject Re: pg_plan_advice
Date
Msg-id CA+TgmoY79RwaFyXpcMvniLUSKbC19mYpr9pXy8inuDZCzagk4A@mail.gmail.com
Whole thread Raw
In response to Re: pg_plan_advice  (Mark Dilger <mark.dilger@enterprisedb.com>)
List pgsql-hackers
On Thu, Mar 26, 2026 at 7:21 PM Mark Dilger
<mark.dilger@enterprisedb.com> wrote:
> Then every single query that triggers advice collection will:
>   1. Successfully allocate an advice entry from existing free space
>   2. Enter store_shared_advice, hit the same chunk boundary
>   3. Fail to allocate the chunk
>   4. Leak the advice entry
>   5. Reduce remaining free space in the small size classes

Yeah, that's a leak. I just got through trying to harden
pg_stash_advice so that kind of thing can't happen, but I failed to
realize that pg_collect_advice has a version of the same issue.

Thanks,

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Windows meson build
Next
From: Peter Eisentraut
Date:
Subject: Re: Thread-safe getopt()