mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
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 commitsd85e0f366a
andea4e1c0e8f
) 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/2201.1561521148@sss.pgh.pa.us
This commit is contained in:
@@ -53,6 +53,6 @@
|
||||
*/
|
||||
|
||||
/* yyyymmddN */
|
||||
#define CATALOG_VERSION_NO 201907031
|
||||
#define CATALOG_VERSION_NO 201907032
|
||||
|
||||
#endif
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user