Re: Use stack allocated StringInfoDatas, where possible (round 2)

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Use stack allocated StringInfoDatas, where possible (round 2)
Date: 2026-04-12 22:45:37
Message-ID: CAApHDvp1d_tN-7ZVESZB9Eih+dGxxsWATC63nKLAjtM5yu_jxQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 13 Apr 2026 at 01:34, David Rowley <dgrowleyml(at)gmail(dot)com> 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2026-04-12 23:33:02 Re: Use proc_exit() in WalRcvWaitForStartPosition
Previous Message Tomas Vondra 2026-04-12 22:27:33 Re: Change default of jit to off