summaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistxlog.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-01-02 21:23:02 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2018-01-02 21:23:06 -0500
commit5dc692f78d3bee1e86d095a9e8d9242b44f78b01 (patch)
tree76ba4d6b57529e606988d9939851ea97793757c4 /src/backend/access/gist/gistxlog.c
parent54eff5311d7c8e3d309774713b91e78067d2ad42 (diff)
downloadpostgresql-5dc692f78d3bee1e86d095a9e8d9242b44f78b01.tar.gz
Ensure proper alignment of tuples in HashMemoryChunkData buffers.
The previous coding relied (without any documentation) on the data[] member of HashMemoryChunkData being at a MAXALIGN'ed offset. If it was not, the tuples would not be maxaligned either, leading to failures on alignment-picky machines. While there seems to be no live bug on any platform we support, this is clearly pretty fragile: any addition to or rearrangement of the fields in HashMemoryChunkData could break it. Let's remove the hazard by getting rid of the data[] member and instead using pointer arithmetic with an explicitly maxalign'ed offset. Discussion: https://postgr.es/m/14483.1514938129@sss.pgh.pa.us
Diffstat (limited to 'src/backend/access/gist/gistxlog.c')
0 files changed, 0 insertions, 0 deletions