]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Use stack-allocated StringInfoDatas, where possible
authorDavid Rowley <drowley@postgresql.org>
Sun, 12 Apr 2026 22:43:19 +0000 (10:43 +1200)
committerDavid Rowley <drowley@postgresql.org>
Sun, 12 Apr 2026 22:43:19 +0000 (10:43 +1200)
commita63bbc811d41b3567eb37fe2636e660a852dbbf2
treeaae2909d63ca2224e3a850e480e10fe609bda0ec
parenta78cf591a3f5288aa5ae96902a36e342a3178b79
Use stack-allocated StringInfoDatas, where possible

6d0eba662 already did most of the changes, but some new ones snuck in
just prior to that commit, so these got missed.

Having these short-lived StringInfoDatas on the stack rather than having
them get palloc'd by makeStringInfo() is simply for performance as it
saves doing a 2nd palloc.

Since this code is new to v19, it makes sense to improve it now rather
than wait until we branch as having v19 and v20 differ here just makes it
harder to backpatch fixes in this area.

Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: David Rowley <dgrowleyml@gmail.com>
Discussion: https://postgr.es/m/adt4wpj4FZwR+S7I@ip-10-97-1-34.eu-west-3.compute.internal
src/backend/replication/logical/sequencesync.c