pg_diffix icon indicating copy to clipboard operation
pg_diffix copied to clipboard

Make sure to detoast varlen datums before hashing

Open edongashi opened this issue 3 years ago • 0 comments

We hash in a few places (aid, count distinct, bucket seed, ...?). Variable length data can potentially be compressed, and instead of hashing the actual value we hash the compressed bytes.

We need to detoast or at least assert that the values are OK to hash.

PG_DETOAST_DATUM_COPY if you want to make sure the result is always pfreeable.

edongashi avatar Apr 11 '22 14:04 edongashi