pgsql: Fix planner failure with extended statistics on partitioned tabl

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix planner failure with extended statistics on partitioned tabl
Date: 2022-11-01 18:34:56
Message-ID: E1opw6C-001nuA-82@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix planner failure with extended statistics on partitioned tables.

Some cases would result in "cache lookup failed for statistics object",
due to trying to fetch inherited statistics when only non-inherited
ones are available or vice versa.

Richard Guo and Justin Pryzby

Discussion: https://postgr.es/m/20221030170520.GM16921@telsasoft.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f4857082bc16f36a5cdc6f8328cdc8071bb1715e

Modified Files
--------------
src/backend/utils/adt/selfuncs.c | 11 +++++++++--
src/test/regress/expected/stats_ext.out | 8 +++++++-
src/test/regress/sql/stats_ext.sql | 3 ++-
3 files changed, 18 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2022-11-01 21:09:41 pgsql: Update time zone data files to tzdata release 2022f.
Previous Message Tom Lane 2022-11-01 16:48:22 pgsql: pg_stat_statements: fetch stmt location/length before it disappe