summaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistutil.c
diff options
context:
space:
mode:
authorDavid Rowley2023-10-09 04:25:16 +0000
committerDavid Rowley2023-10-09 04:25:16 +0000
commit608fd198def5390c3490bfe903730207dfd8eeb4 (patch)
treeb252efcaca1e13db80542ecd3913074a167a3590 /src/backend/access/gist/gistutil.c
parent7cc2f59dd57ab275497ae42a4f98e7936e1e3723 (diff)
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
Diffstat (limited to 'src/backend/access/gist/gistutil.c')
0 files changed, 0 insertions, 0 deletions