Properly determine length for on-disk TOAST values
Tomas Vondra <tomas.vondra@postgresql.org>
Properly determine length for on-disk TOAST values In detoast_attr_slice, VARSIZE_ANY was used to compute compressed length of on-disk TOAST values. That's incorrect, because the varlena value may be just a TOAST pointer, producing either bogus value or crashing. This is likely why the code was crashing on big-endian machines before 540f31680913 replaced the VARSIZE with VARSIZE_ANY, which however only masked the issue. Reported-by: Rushabh Lathia Discussion: https://postgr.es/m/CAL-OGkthU9Gs7TZchf5OWaL-Gsi=hXqufTxKv9qpNG73d5na_g@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/common/detoast.c | modified | +1 −1 |
Discussion
- Optimize partial TOAST decompression 30 messages · 2019-06-02 → 2019-11-15