From: | Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Reduce overhead of pg_mcv_list (de)serialization |
Date: | 2019-04-03 19:23:53 |
Message-ID: | E1hBlUH-0004gc-Jk@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2019-04-03 21:16:21 | pgsql: Remove now-unnecessary thread pointer arguments in pgbench. |
Previous Message | Stephen Frost | 2019-04-03 19:03:02 | pgsql: GSSAPI encryption support |