Re: Decoding speculative insert with toast leaks memory

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, Amit Langote <amitlangote09@gmail.com>, Dilip Kumar <dilipbalaut@gmail.com>, osumi.takamichi@fujitsu.com, Alvaro Herrera <alvherre@alvh.no-ip.org>, Andres Freund <andres@anarazel.de>, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Petr Jelinek <petr.jelinek@enterprisedb.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-06-23T14:51:31Z
Lists: pgsql-hackers
Tomas Vondra <tomas.vondra@enterprisedb.com> writes:
> While rebasing a patch broken by 4daa140a2f5, I noticed that the patch
> does this:

> @@ -63,6 +63,7 @@ enum ReorderBufferChangeType
>         REORDER_BUFFER_CHANGE_INTERNAL_TUPLECID,
>         REORDER_BUFFER_CHANGE_INTERNAL_SPEC_INSERT,
>         REORDER_BUFFER_CHANGE_INTERNAL_SPEC_CONFIRM,
> +       REORDER_BUFFER_CHANGE_INTERNAL_SPEC_ABORT,
>         REORDER_BUFFER_CHANGE_TRUNCATE
>  };

> Isn't that an undesirable ABI break for extensions?

I think it's OK in HEAD.  I agree we shouldn't do it like that
in the back branches.

			regards, tom lane



Commits

  1. Fix ABI break introduced by commit 4daa140a2f.

  2. Fix valgrind issue in pgoutput.c.

  3. Fix decoding of speculative aborts.

  4. pgoutput: Fix memory leak due to RelationSyncEntry.map.

  5. Fix initialization of RelationSyncEntry for streaming transactions.

  6. Implement streaming mode in ReorderBuffer.