From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Simplify pg_mcv_list (de)serialization
Date: Fri, 05 Jul 2019 01:06:08 +0000
Message-ID: <E1hjCfw-0001ax-Dr@gemulon.postgresql.org> (raw)
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/2201.1561521148@sss.pgh.pa.us
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/08aa131c7a72195113ab3a7b191fe8014dd3a898
Modified Files
--------------
src/backend/statistics/mcv.c | 291 ++++++++++++++---------
src/include/catalog/catversion.h | 2 +-
src/include/statistics/extended_stats_internal.h | 1 +
3 files changed, 183 insertions(+), 111 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tomas.vondra@postgresql.org
Subject: Re: pgsql: Simplify pg_mcv_list (de)serialization
In-Reply-To: <E1hjCfw-0001ax-Dr@gemulon.postgresql.org>
References: <E1hjCfw-0001ax-Dr@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox