git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 7cc2f59) | patch
Optimize various aggregate deserialization functions
Mon, 9 Oct 2023 04:25:16 +0000 (17:25 +1300)
Mon, 9 Oct 2023 04:25:16 +0000 (17:25 +1300)
commit 608fd198def5390c3490bfe903730207dfd8eeb4
Optimize various aggregate deserialization functions

The serialized representation of an internal aggregate state is a bytea
value. In each deserial function, in order to "receive" the bytea value
we appended it onto a short-lived StringInfoData using
appendBinaryStringInfo. This was a little wasteful as it meant having to
palloc memory, copy a (possibly long) series of bytes then later pfree
that memory. Instead of going to this extra trouble, we can just fake up
a StringInfoData and point the data directly at the bytea's payload. This
should help increase the performance of internal aggregate
deserialization.

Reviewed-by: Michael Paquier
Discussion: https://postgr.es/m/CAApHDvr=e-YOigriSHHm324a40HPqcUhSp6pWWgjz5WwegR=cQ@mail.gmail.com
src/backend/utils/adt/array_userfuncs.c diff | blob | blame | history
src/backend/utils/adt/numeric.c diff | blob | blame | history
src/backend/utils/adt/varlena.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /