Fix planner failure with extended statistics on partitioned tables.

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

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