Re: Improve a few appendStringInfo calls new to v18

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Improve a few appendStringInfo calls new to v18
Date: 2025-04-10 14:51:53
Message-ID: Z_fbCR8_BL6FwXWw@nathan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 10, 2025 at 11:24:36AM +0300, Heikki Linnakangas wrote:
> On 10/04/2025 06:51, David Rowley wrote:
>> Any objections to doing this soonish? Or in a few weeks?
>
> Sure, let's do it. Why would we wait?

+1. You did something similar for v17 (commit 8461424), and it seems like
an entirely reasonable post-feature-freeze routine to me.

This probably isn't v18 material, but this reminds me of my idea to change
appendStringInfoString() into a macro for appendBinaryStringInfo() so that
the compiler can remove the runtime strlen() calls for string literals [0].
In most cases, the benefits are probably negligible, but StringInfo is
sometimes used in hot paths.

[0] https://postgr.es/m/20231218164135.GA530790%40nathanxps13

--
nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2025-04-10 14:58:18 Re: Add os_page_num to pg_buffercache
Previous Message Dave Cramer 2025-04-10 14:40:39 Re: Correct documentation for protocol version