Re: Use stack allocated StringInfoDatas, where possible (round 2) - Mailing list pgsql-hackers

From David Rowley
Subject Re: Use stack allocated StringInfoDatas, where possible (round 2)
Date
Msg-id CAApHDvp1d_tN-7ZVESZB9Eih+dGxxsWATC63nKLAjtM5yu_jxQ@mail.gmail.com
Whole thread
In response to Re: Use stack allocated StringInfoDatas, where possible (round 2)  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-hackers
On Mon, 13 Apr 2026 at 01:34, David Rowley <dgrowleyml@gmail.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



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Change default of jit to off
Next
From: Chao Li
Date:
Subject: Re: Use proc_exit() in WalRcvWaitForStartPosition