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.96) (envelope-from ) id 1wC3Yw-001ck1-0G for pgsql-hackers@arkaria.postgresql.org; Sun, 12 Apr 2026 22:45:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wC3Yu-003O6g-0H for pgsql-hackers@arkaria.postgresql.org; Sun, 12 Apr 2026 22:45: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.96) (envelope-from ) id 1wC3Yt-003O6Y-2Q for pgsql-hackers@lists.postgresql.org; Sun, 12 Apr 2026 22:45:52 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wC3Ys-00000000hZM-0qg8 for pgsql-hackers@lists.postgresql.org; Sun, 12 Apr 2026 22:45:51 +0000 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-43cf906b007so2314311f8f.0 for ; Sun, 12 Apr 2026 15:45:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776033949; cv=none; d=google.com; s=arc-20240605; b=R/MH4opTc9CSKRDDKb6r68UG4BfFJxmdtwEDd5zMyXlFQpup7KUBAYvGJEow/Rd2gu qybz+OfMzNBZTZX/dmyh5LF3+qbX6TMpcL4Ux7PDFatV0/mysbEEbCw1+17dqyMd2RRO t8rjWuBlwkl+FnBAeMYK2aQyRTV7x637oqhw5NELxxJ7/fc7VRXQvdm66najW0JzxTPQ MUIivT+P7D3gszjCjJY3bhRpMCXxeJqzDqN1v34zTUGTu6H29kdJrQi8+hTakLozRvSK IY/IExSoG/1kgGOItwpYsy+1Ua54N16iweTTvYUxfBukZapc+bQ2deKRRigyuYuO8/SD 0vIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=W+U5PkPi2f6vuSRePBwHfuPbWPhjS8D/MYGFmOGM+fU=; fh=PyrCF+qsNaqndkAt6nzpU6jTKSl/iqI3Radtv0tyAIM=; b=dJruOBTIHqm0It08Nyt45jJavF7yCrmJT/vn58KWiAPiEiOB9k5l9Z6WnKvf7GgUP6 WimxhST0+9gSMeDRmOB1gIgKFfJxLSUAlp7aekqE4BZGrWM3BdGxygu3vcXpZ2cbHNj5 5FAe/uylMDyWgFC+qCHM/NXD35qBEgzlV5xdnvSwrJHopO98xVqdX+74rwBkWiKHaWpP GIw50VxBEiBOkhPKcUPHUMY/Z2BXprX3jkMcEz3w7JBGY2RTWG07Alla5W1j2wMWHNqK DKGixzFiedX4vhJQAU0F+3iSed/nljdFsnT1T3XWwGLShx+Zq23vnl7JFVYmnkxevCXJ WvQA==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776033949; x=1776638749; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=W+U5PkPi2f6vuSRePBwHfuPbWPhjS8D/MYGFmOGM+fU=; b=hrDWkhWUdo8/aaWYwsDKxmmpg0iDq7FTkJlgkTD/S9CQHoXLg9tXe/19pNWDxvhnmC QBencweyVVUz47SSk0farxvDPBAMQx3i3WKZO25Bs4KsltrmPYDtjvoyQfJAg1xN8Pr3 x5lRHC9cB50WsdaXvsYR+FXkglY7EuJYpK78tclv9dYrTNxjhWprbIzRAcVIsrpzKVl8 TcH8iie+I4p/NDHl/oHDUHa2eIdEp7y7BgxWgtfQM+aoSSN+Bki0aNFjpG9fx2fo8E/o Azs8TAW/eOfLQQ5piMOvdAFK+2wQFvm1mCdMa6Y6iyzFf0cKKpwlZqvdPHOBlCi5RrCF GcVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776033949; x=1776638749; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=W+U5PkPi2f6vuSRePBwHfuPbWPhjS8D/MYGFmOGM+fU=; b=acop49tQSEi6l978nQ0bZc92vIYVQ00oXwwTfslygSOC6ay5XYGwin7vsrRGUbR951 t2jEPF8A+mFxyBfdEGsaN7hDZB+eRePOvwrbX6XhXGnrI51cCO5VzecAM3aqyt2bHNZD F8tewVtl4lpFXqhF24mOVrvb8RxcGMFVi4ePIxHR2CJzJsez2a8MfGJCV+FugYd1wFN2 zZu+KmP1O1aeVG1odvNbQgzKlLzd2KympnieewDFf8Czn+zA0OzrGRVZfZcoJUnnMQs/ oa5QmFpoIXzpAleGV2DYjJIzKxhYyDUKwZfKcJd8UFKpKlLBSq/kQqJpGxQqGno5Q8oP BKUg== X-Gm-Message-State: AOJu0Yw3TKi064vmJIjOLx9eepoGXIUZtA0705U41tJ1413dQUPpzQpp CQ5Wyy1309rsh3JUq/wxXoH8+leKxkQlZ+mVIOBzPJJ/MKHaG9Dc2/J1i9iv3gSuWacDIbRp/o0 Jx+uamfLSeGclMxdNHoMaAJNQADdGbzw= X-Gm-Gg: AeBDievvArC7oSO5x+jyVdXc2fNAqo35vOpIU6Bo79+WkoY25S0+kl5mqCbkqVj0TyA FTrxtftUlyAdf/kYLW+HT3dz993Ip6dMmY0+Jqg0IQmcaFC6TgrEBLlBTRE85oSl64s5kDYTWBx LvO5CJHt2shCpHaNdakdiZuRHj60FhN4TQhO0Ldslo8VqgEC94Etbff4eOJ7mcxLPbSbzdlVujy T6GtHXXBNF19wsJpq6BEq2y1Hy3w2zCD6/BsPkEmsM1Is6xlWaw7EVujmSrVcne+h8cZ8jUeDK8 gWz8MPNk9nPdrZsxZ5nIiVmIlmo/7C+E8FZap2HrZsxiaqKqM4sglC5Pn+oW1PCTVpmRyQQAD1w qXcO8+pUF X-Received: by 2002:a05:6000:24c9:b0:43d:7946:badc with SMTP id ffacd0b85a97d-43d7946bb84mr1546984f8f.26.1776033948875; Sun, 12 Apr 2026 15:45:48 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: David Rowley Date: Mon, 13 Apr 2026 10:45:37 +1200 X-Gm-Features: AQROBzD4FRzYjdCRODRnmsQZ_eFYYFf7TCFL1Qv37HpZDsINQ1W3Xo3HuP_lrUs Message-ID: Subject: Re: Use stack allocated StringInfoDatas, where possible (round 2) To: Bertrand Drouvot Cc: pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 13 Apr 2026 at 01:34, David Rowley wrote: > I think the author of copy_sequences() doesn't know what > resetStringInfo() does. I expect they think that it'll pfree all the > memory, but that's what destroyStringInfo() is for. That was poor analysis. The resetStringInfo is there to reset the StringInfo before the next loop. So nothing is wrong with it. I've now pushed your patch. David