Remove duplicate definition of the compressed varlena header toast_internals.h described the header of a compressed-in-line varlena a second time, as toast_compress_header, with its own TOAST_COMPRESS_* macros to read and write the tcinfo word. varatt.h already describes the same bytes as varattrib_4b.va_compressed and provides equivalent macros that act as setter and getter of this information, as of VARDATA_COMPRESSED_GET_EXTSIZE() and GET_COMPRESS_METHOD().
Let's remove the duplicate definition, and switch the TOAST code to use the macros from varatt.h. There should be no behavior change. Note that toast_compression.h is removed from toast_internals.h, added to the C files where its declarations are required. Author: Nikhil Kumar Veldanda <[email protected]> Author: Michael Paquier <[email protected]> Discussion: https://postgr.es/m/cafafj_fejqzrkyvn7ur0ajx8iz8sr14nhevjnyc8jnoqtmx...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/e27f3b2cad7759097407ad01ccaaca506179e346 Modified Files -------------- contrib/amcheck/verify_heapam.c | 1 + src/backend/access/brin/brin_tuple.c | 1 + src/backend/access/common/detoast.c | 7 ++++--- src/backend/access/common/toast_internals.c | 3 ++- src/include/access/toast_internals.h | 29 ----------------------------- src/include/varatt.h | 15 +++++++++++++++ src/tools/pgindent/typedefs.list | 1 - 7 files changed, 23 insertions(+), 34 deletions(-)
