pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix pg_mcv_list deserialization
Date: Mon, 15 Apr 2019 22:03:21 +0000
Message-ID: <E1hG9hB-0001rs-IY@gemulon.postgresql.org> (raw)

Fix pg_mcv_list deserialization

The memcpy() was copying type OIDs in the wrong direction, so the
deserialized MCV list always had them as 0. This is mostly harmless
except when printing the data in pg_mcv_list_items(), in which case
it reported

    ERROR:  cache lookup failed for type 0

Also added a simple regression test for pg_mcv_list_items() function,
printing a single-item MCV list.

Reported-By: Dean Rasheed
Discussion: https://postgr.es/m/CAEZATCX6T0iDTTZrqyec4Cd6b4yuL7euu4=rQRXaVBAVrUi1Cg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3824ca30d162611fdaade403d3aec449fecd0924

Modified Files
--------------
src/backend/statistics/mcv.c            |  2 +-
src/test/regress/expected/stats_ext.out | 11 +++++++++++
src/test/regress/sql/stats_ext.sql      |  8 ++++++++
3 files changed, 20 insertions(+), 1 deletion(-)



Message-ID: <E1hG9hB-0001rs-IY@gemulon.postgresql.org>
Permalink:  ../E1hG9hB-0001rs-IY@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hG9hB-0001rs-IY@gemulon.postgresql.org

 · 

reply

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: Fix pg_mcv_list deserialization
  In-Reply-To: <E1hG9hB-0001rs-IY@gemulon.postgresql.org>
  References: <E1hG9hB-0001rs-IY@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