Re: GIN amcheck leaks memory in gin_check_parent_keys_consistency - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: GIN amcheck leaks memory in gin_check_parent_keys_consistency
Date
Msg-id akdrF3YenEmMZssu@paquier.xyz
Whole thread
In response to GIN amcheck leaks memory in gin_check_parent_keys_consistency  (Kirill Reshke <reshkekirill@gmail.com>)
Responses Re: GIN amcheck leaks memory in gin_check_parent_keys_consistency
List pgsql-hackers
On Fri, Jul 03, 2026 at 02:20:08AM +0500, Kirill Reshke wrote:
> I was debugging the GIN index issue today and noticed my postgresql
> session which I used to run amcheck eats too much memory. PFA fix.

Hmm..  Still need to do some measurements with a large GIN index to
get an idea, but a quick lookup at the code points that you are right.
This could stack quite a lot in a single pass even if we have a
dedicated memory context while in gin_check_parent_keys_consistency().
Will measure and check.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Path Traversal Vulnerability in pg_dump Directory Format
Next
From: "Zhijie Hou (Fujitsu)"
Date:
Subject: RE: Re-read subscription state after lock in AlterSubscription