Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tmo1t-00BOCx-VR for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Feb 2025 06:02:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tmo1s-00ERxm-N6 for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Feb 2025 06:02:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tmo1s-00ERuA-8O for pgsql-hackers@lists.postgresql.org; Tue, 25 Feb 2025 06:02:52 +0000 Received: from fhigh-a1-smtp.messagingengine.com ([103.168.172.152]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tmo1p-000c0a-0h for pgsql-hackers@postgresql.org; Tue, 25 Feb 2025 06:02:51 +0000 Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfhigh.phl.internal (Postfix) with ESMTP id 78FEE11400FE; Tue, 25 Feb 2025 01:02:49 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Tue, 25 Feb 2025 01:02:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1740463369; x=1740549769; bh=bUycMvGJK+ Z89YN8/Va0LDLsBP0zNFF+7i+MsLJuNeU=; b=xc04QDRKoQo2R9+Y9ifXUkWG+n hua65KkAUwnRW5cXL4HEwL3qk2mZ1sl4HjuVUqfCRDN2VMmQ/FLK/exvSdZHJJHa De9zS/PhBDiMAO4dH0Q2vaVftDS9PoJmcajswm2ubSHlefhfJKhmGQWIEsfkZN/z oTm/DePGIkv4+u+pzQSUSeRnNnGseqNme3Abb1Bix+ftPxS47+aqYRm+rg0xjGru 9OQ5vrkzug5qKE1xmhCnYfgiMYVJJjfGIk/T+MHNg8EUSxzdF4aAkkcDD1q0J4l1 8OEeGsYLhNtT1ba8GcO9OzC1DZvvYsy0p/MAf/OYxqhCG+SWBppqiErV5fBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1740463369; x=1740549769; bh=bUycMvGJK+Z89YN8/Va0LDLsBP0zNFF+7i+ MsLJuNeU=; b=h4iJxI1MVbJ6tPg/PhXK7tDf96G+hrFn6isixHUAxgcof9j+veO buMlxdCJmsrNwyuydqMwCJr7N4ugyL7MJZ7ImgZ2hgsxy636Up5vnsqhjH6HTQcD 56N62WA8b791w5HHmaKJ5rPLs4uXruHBPlXYNdp0iMxA5uVaSot984UTWiw9BNE/ GX5gVuXT/CM5ujTj2aLFXO2TpjDOCkojLP0Ki7gQxbJ2CD2Fh8/SqsUzpSCJUMFs tL3dLISBXO/S7Cn1mUDu62spEYdb+X1HRT1zhLo3/XvnntvXgNvkMrz5YTpQchAB U7qX5HkglGbOt8DuJHNsrziSEYIgTBr/THQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdektdelvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenfghrlhcuvffnffculdefhedmnecujfgurhepfffhvfevuffk fhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrh cuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeeg ffejvefgveduvdejtddvtdeijeehudeuledvudeftdfgfeejvdekveekiedvvdenucffoh hmrghinhepphhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihii dpnhgspghrtghpthhtohephedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepthhg lhesshhsshdrphhghhdrphgrrdhushdprhgtphhtthhopegrnhgurhgvshesrghnrghrrg iivghlrdguvgdprhgtphhtthhopegvuhhlvghrsegvuhhlvghrthhordgtohhmpdhrtghp thhtoheprhgrnhhivghrrdhvfhesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqh hlqdhhrggtkhgvrhhssehpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 25 Feb 2025 01:02:47 -0500 (EST) Date: Tue, 25 Feb 2025 15:02:24 +0900 From: Michael Paquier To: Tom Lane Cc: Andres Freund , Euler Taveira , "ranier.vf@gmail.com" , pgsql-hackers Subject: Re: Small memory fixes for pg_createsubcriber Message-ID: References: <68d6d810-4ef1-4f62-b47f-89b21501249b@app.fastmail.com> <3337507.1739376124@sss.pgh.pa.us> <3490963.1739405311@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="kDEENstXGTlT16hj" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --kDEENstXGTlT16hj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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 --kDEENstXGTlT16hj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAme9XPAACgkQnvQgOdby QH0S/A/9E+Shz+axIysB8wAKMSajYNs7f5gjWit0cgD2MBZ1e69F6O4VHr1g1SDb 5AnpwHxdeC+IKHdA11tvU6eW7Ow3TPBSSpOuiCn5e/rrXIcOoBMl5NbR1tLCV+Pb 7LlfFiUSwEBaUOapVoI0PDaqBoUQIqUgbwVGO1JxsocfO7AwmH5KJomEtMSV1PZ0 CT7fX/YTFuYlgBw8k8P03E+0EpLUxrojE6KQOjAxn+mVrL42kZG47SYigQ6OzZ5V wU50c1zRARDKg9MU0606SL9N9HJ1zp/1e8dLm6nal4GYt2OZdRjLHhdnZMjLzRnI /IZ+NsOCVt7gXKKJ0AiGnz54KCEmUe0UdojpMCefUK5CNsPwBKWb4iV+Lb1S5va2 Gu8uX0JlF+wRWRwbCpwxspFJd0WnWlDyA7mSVfGSPqRt4ZGpwLb55Kw5MkCJRRvJ N1WTHvMSCr4IWO94IAXRegwusX2hgwGrm5N6/LmcV4UjsTxyH10JMdmBV3UbVz+a ybBM9Ul+Bq3qA9cntahLYgup3wHet5XmLI5DHTBy4YE6Otftjgz2h3IwIILUPpxZ zC6hPlREpkLzqvtelTrOW3EQSAHr4w5orPtBRyofshAB7KBUUVCPG05JPvmmRj5C JulToYhVSuzTX8Y/q3CLf4Mwm9v33myC3VJM3Ry5tzUQ9msAsU8= =rs0r -----END PGP SIGNATURE----- --kDEENstXGTlT16hj--