Re: SnapBuildSerialize function forgot pfree variable ondisk_c

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: 范孝剑(康贤) <funnyxj(dot)fxj(at)alibaba-inc(dot)com>
Cc: pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: SnapBuildSerialize function forgot pfree variable ondisk_c
Date: 2021-01-13 05:40:26
Message-ID: CAA4eK1+ATnPgUxAYBvPQrTn2V76bcFmrnH072B=NzGK=ZSc3YQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Jan 12, 2021 at 7:12 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Fri, Nov 13, 2020 at 11:36 AM 范孝剑(康贤) <funnyxj(dot)fxj(at)alibaba-inc(dot)com> wrote:
> >
> > If we create logical slot frequently, every time when creating a logical slot, it will generate a LogStandbySnapshot wal record.
> >
> > Session A:
> > do language plpgsql $$
> > declare
> > v_text text := 'a';
> > begin
> > for i in 1..290000 loop
> > execute $_$select pg_create_logical_replication_slot('logical_slot4', 'test_decoding')$_$;
> > execute $_$select pg_drop_replication_slot('logical_slot4')$_$;
> > end loop;
> > exception when others then
> > raise notice 'execute failed.';
> > end;
> > $$;
> >
> > Session B:
> > pg_recvlogical -d postgres --start -S test -f test.log
> >
>
> Thanks for sharing the test. I am able to reproduce the issue and the
> attached fixes it for me. This needs to be backpatched till 9.5 where
> it was introduced. I am planning to push this tomorrow.
>

Pushed!

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2021-01-13 05:53:58 Re: BUG #16577: Segfault on altering a table located in a dropped tablespace
Previous Message michael wilder 2021-01-13 03:57:51 Re: BUG #16808: Postgres Windows installer fails with unknown error and terminates