aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/spgist/spgutils.c
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2023-08-22 11:57:08 -0400
committerAndrew Dunstan <andrew@dunslane.net>2023-08-22 15:17:05 -0400
commita68458108512890d03da39f0132b829ddd5a69ab (patch)
tree39e30aebbd0649236870c313e6398bfe0d25497f /src/backend/access/spgist/spgutils.c
parent757fa45c86bdadc36cae34fca383e715e73eec67 (diff)
downloadpostgresql-a68458108512890d03da39f0132b829ddd5a69ab.tar.gz
postgresql-a68458108512890d03da39f0132b829ddd5a69ab.zip
Cache by-reference missing values in a long lived context
Attribute missing values might be needed past the lifetime of the tuple descriptors from which they are extracted. To avoid possibly using pointers for by-reference values which might thus be left dangling, we cache a datumCopy'd version of the datum in the TopMemoryContext. Since we first search for the value this only needs to be done once per session for any such value. Original complaint from Tom Lane, idea for mitigation by Andrew Dunstan, tweaked by Tom Lane. Backpatch to version 11 where missing values were introduced. Discussion: https://postgr.es/m/1306569.1687978174@sss.pgh.pa.us
Diffstat (limited to 'src/backend/access/spgist/spgutils.c')
0 files changed, 0 insertions, 0 deletions