Re: Small memory fixes for pg_createsubcriber
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
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-12T17:23:17Z
Lists: pgsql-hackers
=?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= <ilmari@ilmari.org> writes: > Andres Freund <andres@anarazel.de> writes: >> Particularly for something like libpq it's not quitetrivial to add >> attributes like this, of course. We can't even depend on pg_config.h. >> One way would be to define them in libpq-fe.h, guarded by an #ifdef, that's >> "armed" by a commandline -D flag, if the compiler is supported? > Does it need a -D flag, wouldn't __has_attribute(malloc) (with the > fallback definition in c.h) be enough? libpq-fe.h has to be compilable by application code that has never heard of pg_config.h let alone c.h, so we'd have to tread carefully about not breaking that property. But it seems like this would be worth looking into. regards, tom lane
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