aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeProjectSet.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-09-25 12:07:32 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2023-09-25 12:07:32 -0400
commit036297cf1b8490bb72439d9ab471670598d3ad2f (patch)
tree9354496ad16add60d10c933b9727f924885a33dc /src/backend/executor/nodeProjectSet.c
parentcf1c65070a89de1e810ef2c5a2036ca4a56c2fdc (diff)
downloadpostgresql-036297cf1b8490bb72439d9ab471670598d3ad2f.tar.gz
postgresql-036297cf1b8490bb72439d9ab471670598d3ad2f.zip
Pack struct ParsedWord more tightly.
In a 64-bit build there's an awful lot of useless pad space in ParsedWords. Since we may allocate large arrays of these, it's worth some effort to reduce their size. Here we reduce the alen field from uint32 to uint16, and then re-order the fields to avoid unnecessary padding. alen is only used to remember the allocated size of the apos[] array, which is not allowed to exceed MAXNUMPOS (256) elements, so uint16 is plenty of space for it. That gets us from 40 bytes to 24 on 64-bit builds, and from 20 bytes to 16 on 32-bit builds. Per discussion of bug #18080. Unfortunately this is an ABI break so we can't back-patch. Discussion: https://postgr.es/m/1146921.1695411070@sss.pgh.pa.us
Diffstat (limited to 'src/backend/executor/nodeProjectSet.c')
0 files changed, 0 insertions, 0 deletions