Fix planner failure with extended statistics on partitioned tables.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 1f1865e9083625239769c26f68b9c2861b8d4b1c
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2022-11-01T18:34:44Z
Releases: 15.1
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

Files

Discussion