Re: Replica Identity check of partition table on subscriber

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, "shiy(dot)fnst(at)fujitsu(dot)com" <shiy(dot)fnst(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Replica Identity check of partition table on subscriber
Date: 2022-06-22 04:38:59
Message-ID: CA+HiwqFS1MVmymu+yEQ9Bt-Cgy4Q1UC9Sod6gVeO-RgM2pwujg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Wed, Jun 22, 2022 at 12:02 PM houzj(dot)fnst(at)fujitsu(dot)com
<houzj(dot)fnst(at)fujitsu(dot)com> wrote:
> Since the patch has been committed. Attach the last patch to fix the memory leak.
>
> The bug exists on PG10 ~ PG15(HEAD).
>
> For HEAD,PG14,PG13, to fix the memory leak, I think we should use
> free_attrmap instead of pfree and release the no-longer-useful attrmap
> When rebuilding the map info.
>
> For PG12,PG11,PG10, we only need to add the code to release the
> no-longer-useful attrmap when rebuilding the map info. We can still use
> pfree() because the attrmap in back-branch is a single array like:
>
> entry->attrmap = palloc(desc->natts * sizeof(AttrNumber));

LGTM, thank you.

--
Thanks, Amit Langote
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2022-06-22 05:38:36 Re: Support logical replication of DDLs
Previous Message Julien Rouhaud 2022-06-22 04:38:10 Re: [PROPOSAL] Detecting plan changes with plan_id in pg_stat_activity