Re: Fixup some appendStringInfo and appendPQExpBuffer calls

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Fixup some appendStringInfo and appendPQExpBuffer calls
Дата
Msg-id CAApHDvp4Ty5VJupumRp1bUuaL2Hsxax1hM99dtZcPPS1AWOkqw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Fixup some appendStringInfo and appendPQExpBuffer calls  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Fixup some appendStringInfo and appendPQExpBuffer calls  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Fixup some appendStringInfo and appendPQExpBuffer calls  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Wed, 2 Jun 2021 at 16:29, Michael Paquier <michael@paquier.xyz> wrote:
>
> On Wed, Jun 02, 2021 at 01:37:51AM +0000, houzj.fnst@fujitsu.com wrote:
> > In the latest HEAD branch, I found some places were using
> > appendStringInfo/appendPQExpBuffer() when they could have been using
> > appendStringInfoString/ appendPQExpBufferStr() instead. I think we'd better
> > fix these places in case other developers will use these codes as a reference,
> > though, it seems will not bring noticeable performance gain.
>
> Indeed, that's the same thing as 110d817 to make all those calls
> cheaper.  No objections from me to do those changes now rather than
> later on HEAD.

I think it would be good to fix at least the instances that are new
code in PG14 before we branch for PG15.  They all seem low enough risk
and worth keeping the new-to-PG14 code as close to the same as
possible between major versions. It seems more likely that newer code
will need bug fixes in the future so having the code as similar as
possible in each branch makes backpatching easier.

For the code that's not new to PG14, I feel less strongly about those.
In the patch there's just 2 instances of these; one in
contrib/sepgsql/schema.c and another in
src/backend/postmaster/postmaster.c.  I've tried to push for these
sorts of things to be fixed at around this time of year in the past,
but there have been other people thinking we should wait until we
branch. For example [1] and [2].

David

[1] https://www.postgresql.org/message-id/CAKJS1f9APLTZRomOSndx_nFcFNfUxncz%3Dp2_-1wr0hrzT4ELKg%40mail.gmail.com
[2] https://www.postgresql.org/message-id/4a84839e-afe4-ea27-6823-23372511dcbf%402ndquadrant.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: parent foreign tables and row marks
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Outdated comments about proc->sem in lwlock.c