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>, Euler Taveira <euler@eulerto.com>, "ranier.vf@gmail.com" <ranier.vf@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-02-25T06:02:24Z
Lists: pgsql-hackers
On Thu, Feb 13, 2025 at 01:50:29PM +0900, Michael Paquier wrote: > On Wed, Feb 12, 2025 at 07:08:31PM -0500, Tom Lane wrote: >> I spent a little time earlier today seeing what I could do with the >> use-dmalloc patch I posted earlier. It turns out you can get through >> initdb after s/free/PQfreemem/ in just two places, and then the >> backend works fine. But psql is a frickin' disaster --- there's >> free's of strings made with PQExpBuffer all over its backslash-command >> handling, and no easy way to clean it up. Maybe other clients will >> be less of a mess, but I'm not betting on that. > > Hmm. Okay. It sounds like it would be better to group everything > that has been pointed together towards what should be a more generic > solution than what I have posted. So I am holding on touching > anything. Two weeks later. Would there be any objections for doing something in the lines of [1] for pg_upgrade and pg_amcheck? The pg_upgrade bit is a bit strange, for sure, still it's better than the current state of things. [1]: https://www.postgresql.org/message-id/Z601RQxTmIUohdkV@paquier.xyz -- Michael
Commits
-
pg_upgrade: Fix inconsistency in memory freeing
- 9ca2145b00fb 16.9 landed
- ee78823ff5f6 17.5 landed
- 2a083ab807db 18.0 landed
-
pg_amcheck: Fix inconsistency in memory freeing
- 35a591a0486f 14.18 landed
- ec741d48036a 15.13 landed
- 816149dc6bf9 16.9 landed
- f903d4da9276 17.5 landed
- 48e4ae9a0707 18.0 landed
-
Fix some inconsistencies with memory freeing in pg_createsubscriber
- ff6d9cfcb17e 17.4 landed
- 5b94e2753439 18.0 landed
-
Drop pre-existing subscriptions from the converted subscriber.
- 4867f8a555ce 18.0 cited