Re: Small memory fixes for pg_createsubcriber

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>, Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>, Euler Taveira <euler@eulerto.com>, "ranier.vf@gmail.com" <ranier.vf@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-02-12T23:59:58Z
Lists: pgsql-hackers
On Wed, Feb 12, 2025 at 01:35:20PM -0500, Tom Lane wrote:
> For amusement's sake, totally dirty hack-and-slash patch attached.
> (I tested this on macOS, with dmalloc from MacPorts; adjust SHLIB_LINK
> to suit on other platforms.)

Ugh.  Fun one.
--
Michael

Commits

  1. pg_upgrade: Fix inconsistency in memory freeing

  2. pg_amcheck: Fix inconsistency in memory freeing

  3. Fix some inconsistencies with memory freeing in pg_createsubscriber

  4. Drop pre-existing subscriptions from the converted subscriber.