From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Reduce overhead of pg_mcv_list (de)serialization
Date: Wed, 03 Apr 2019 19:23:53 +0000
Message-ID: <E1hBlUH-0004gc-Jk@gemulon.postgresql.org> (raw)
Reduce overhead of pg_mcv_list (de)serialization
Commit ea4e1c0e8f resolved issues with memory alignment in serialized
pg_mcv_list values, but it required copying data to/from the varlena
buffer during serialization and deserialization. As the MCV lits may
be fairly large, the overhead (memory consumption, CPU usage) can get
rather significant too.
This change tweaks the serialization format so that the alignment is
correct with respect to the varlena value, and so the parts may be
accessed directly without copying the data.
Catversion bump, as it affects existing pg_statistic_ext data.
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/c50b3158bfd7fc8c2a0b2d2ede4415fd9859acd1
Modified Files
--------------
src/backend/statistics/mcv.c | 116 ++++++++++++++++++++++++++-------------
src/include/catalog/catversion.h | 2 +-
2 files changed, 78 insertions(+), 40 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: Reduce overhead of pg_mcv_list (de)serialization
In-Reply-To: <E1hBlUH-0004gc-Jk@gemulon.postgresql.org>
References: <E1hBlUH-0004gc-Jk@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