Re: GIN amcheck leaks memory in gin_check_parent_keys_consistency

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: GIN amcheck leaks memory in gin_check_parent_keys_consistency
Date: 2026-07-03 07:56:07
Message-ID: akdrF3YenEmMZssu@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhijie Hou (Fujitsu) 2026-07-03 08:08:13 RE: Re-read subscription state after lock in AlterSubscription
Previous Message Michael Paquier 2026-07-03 07:46:09 Re: Improve the performance of Unicode Normalization Forms.