diff options
author | Tomas Vondra | 2019-07-04 22:45:20 +0000 |
---|---|---|
committer | Tomas Vondra | 2019-07-04 23:32:49 +0000 |
commit | 08aa131c7a72195113ab3a7b191fe8014dd3a898 (patch) | |
tree | 13288e10e94c6faac05a2cea6d413db98e0cf9fa /src/include/statistics/extended_stats_internal.h | |
parent | 4d66285adc6bb4f9e4fd394d478d663cbccb5fc8 (diff) |
Simplify pg_mcv_list (de)serialization
The serialization format of multivariate MCV lists included alignment in
order to allow direct access to part of the serialized data, but despite
multiple fixes (see for example commits d85e0f366a and ea4e1c0e8f) this
proved to be problematic.
This commit abandons alignment in the serialized format, and just copies
everything during deserialization. We now also track amount of memory
needed after deserialization (including alignment), which allows us to
deserialize the MCV list in a single pass.
Bump catversion, as this affects contents of pg_statistic_ext_data.
Backpatch to 12, where multi-column MCV lists were introduced.
Author: Tomas Vondra
Reviewed-by: Tom Lane
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/include/statistics/extended_stats_internal.h')
-rw-r--r-- | src/include/statistics/extended_stats_internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/statistics/extended_stats_internal.h b/src/include/statistics/extended_stats_internal.h index fb03c52f504..8fc541993fa 100644 --- a/src/include/statistics/extended_stats_internal.h +++ b/src/include/statistics/extended_stats_internal.h @@ -36,6 +36,7 @@ typedef struct DimensionInfo { int nvalues; /* number of deduplicated values */ int nbytes; /* number of bytes (serialized) */ + int nbytes_aligned; /* size of deserialized data with alignment */ int typlen; /* pg_type.typlen */ bool typbyval; /* pg_type.typbyval */ } DimensionInfo; |