Re: Handle infinite recursion in logical replication setup - Mailing list pgsql-hackers

From vignesh C
Subject Re: Handle infinite recursion in logical replication setup
Date
Msg-id CALDaNm16QMpF079gFdnSX7ukPpjOrzpp7v+uafq3htGw9K=heQ@mail.gmail.com
Whole thread Raw
In response to RE: Handle infinite recursion in logical replication setup  ("shiy.fnst@fujitsu.com" <shiy.fnst@fujitsu.com>)
List pgsql-hackers
On Thu, 1 Sept 2022 at 08:01, shiy.fnst@fujitsu.com
<shiy.fnst@fujitsu.com> wrote:
>
> On Wed, Aug 31, 2022 1:06 AM vignesh C <vignesh21@gmail.com> wrote:
> >
> > The attached v43 patch has the changes for the same.
> >
>
> Thanks for updating the patch.
>
> Here is a comment on the 0001 patch.
>
> +               if (!isnewtable)
> +               {
> +                       pfree(nspname);
> +                       pfree(relname);
> +                       continue;
> +               }
>
> If it is a new table, in which case it would log a warning, should we also call
> pfree()?

Yes it should be added, I have fixed the same in the v44 patch attached at [1].
[1] -  https://www.postgresql.org/message-id/CALDaNm0NRJ1O1cYcZD%3Df7NgynozFprb7zpJSayFN5rcaS44G6Q%40mail.gmail.com

Regards,
Vignesh



pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Handle infinite recursion in logical replication setup
Next
From: Nathan Bossart
Date:
Subject: make additional use of optimized linear search routines