pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Pyhalov <a.pyhalov@postgrespro.ru>
To: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: memory leak in trigger handling (since PG12)
Date: Fri, 23 Jun 2023 09:03:24 +0300
Message-ID: <48e251869b7ef921b7f894a3c7cb154a@postgrespro.ru> (raw)
In-Reply-To: <ee964409-fc64-d7d2-d8ad-3a64b72b5dc4@enterprisedb.com>
References: <222a3442-7f7d-246c-ed9b-a76209d19239@enterprisedb.com>
	<960113.1684859980@sss.pgh.pa.us>
	<a5d42a2c-0c2e-9fb8-793f-0675d85669be@enterprisedb.com>
	<f706d912-b6fa-f1d7-5a39-dc1be5999183@enterprisedb.com>
	<20230524185559.un4dqfem3u3ktons@awork3.anarazel.de>
	<c3ff31ce-622c-81a9-9dcc-dbb27c5eaf9e@enterprisedb.com>
	<b3c8da23-8850-7697-2aaf-947bb2a4d0a3@enterprisedb.com>
	<acddb17c89b0d6cb940eaeda18c08bbe@postgrespro.ru>
	<36e564f7-6cde-927d-9089-19471a05e8f3@enterprisedb.com>
	<ee964409-fc64-d7d2-d8ad-3a64b72b5dc4@enterprisedb.com>

Tomas Vondra писал 2023-06-22 17:16:
> On 6/22/23 13:46, Tomas Vondra wrote:
>> ...
>> 
>> I haven't tried the reproducer, but I think I see the issue - we store
>> the bitmap as part of the event to be executed later, but the bitmap 
>> is
>> in per-tuple context and gets reset. So I guess we need to copy it 
>> into
>> the proper long-lived context (e.g. AfterTriggerEvents).
>> 
>> I'll get that fixed.
>> 
> 
> Alexander, can you try if this fixes the issue for you?
> 
> 
> regard

Hi.
The patch fixes the problem and looks good to me.
-- 
Best regards,
Alexander Pyhalov,
Postgres Professional





view thread (32+ messages)  latest in thread

Message-ID: <48e251869b7ef921b7f894a3c7cb154a@postgrespro.ru>
Permalink:  ../48e251869b7ef921b7f894a3c7cb154a@postgrespro.ru/
Also on:    postgresql.org/message-id/48e251869b7ef921b7f894a3c7cb154a@postgrespro.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: a.pyhalov@postgrespro.ru, tomas.vondra@enterprisedb.com, andres@anarazel.de, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
  Subject: Re: memory leak in trigger handling (since PG12)
  In-Reply-To: <48e251869b7ef921b7f894a3c7cb154a@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox