pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Simplify pg_mcv_list (de)serialization 2+ messages / 1 participants [nested] [flat]
* pgsql: Simplify pg_mcv_list (de)serialization @ 2019-07-05 01:06 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Tomas Vondra @ 2019-07-05 01:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Simplify pg_mcv_list (de)serialization @ 2019-07-05 15:55 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Tomas Vondra @ 2019-07-05 15:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e74d141d0d97a7a9f059cdb3cd91ff52599a629b 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(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-07-05 15:55 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-07-05 01:06 pgsql: Simplify pg_mcv_list (de)serialization Tomas Vondra <tomas.vondra@postgresql.org> 2019-07-05 15:55 pgsql: Simplify pg_mcv_list (de)serialization Tomas Vondra <tomas.vondra@postgresql.org>
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