postgresql/src/backend/access
Tom Lane 063dd37ebc Short-circuit slice requests that are for more than the object's size.
substring(), and perhaps other callers, isn't careful to pass a
slice length that is no more than the datum's true size.  Since
toast_decompress_datum_slice's children will palloc the requested
slice length, this can waste memory.  Also, close study of the liblz4
documentation suggests that it is dependent on the caller to not ask
for more than the correct amount of decompressed data; this squares
with observed misbehavior with liblz4 1.8.3.  Avoid these problems
by switching to the normal full-decompression code path if the
slice request is >= datum's decompressed size.

Tom Lane and Dilip Kumar

Discussion: https://postgr.es/m/507597.1616370729@sss.pgh.pa.us
2021-03-22 14:01:20 -04:00
..
brin Use valid compression method in brin_form_tuple 2021-03-21 00:28:34 +01:00
common Short-circuit slice requests that are for more than the object's size. 2021-03-22 14:01:20 -04:00
gin VACUUM VERBOSE: Count "newly deleted" index pages. 2021-02-25 14:32:18 -08:00
gist C comments: improve description of GiST NSN and GistBuildLSN 2021-03-10 17:03:10 -05:00
hash Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
heap Allow configurable LZ4 TOAST compression. 2021-03-19 15:10:38 -04:00
index Fix GiST index deletion assert issue. 2021-01-26 23:24:37 -08:00
nbtree Recycle nbtree pages deleted during same VACUUM. 2021-03-21 15:25:39 -07:00
rmgrdesc Don't consider newly inserted tuples in nbtree VACUUM. 2021-03-10 16:27:01 -08:00
spgist VACUUM VERBOSE: Count "newly deleted" index pages. 2021-02-25 14:32:18 -08:00
table Allow configurable LZ4 TOAST compression. 2021-03-19 15:10:38 -04:00
tablesample Update copyright for 2021 2021-01-02 13:06:25 -05:00
transam Fix timeline assignment in checkpoints with 2PC transactions 2021-03-22 08:30:53 +09:00
Makefile Introduce access/{table.h, relation.h}, for generic functions from heapam.h. 2019-01-21 10:51:36 -08:00