Fix planner failure with extended statistics on partitioned tables.
authorTom Lane <[email protected]>
Tue, 1 Nov 2022 18:34:44 +0000 (14:34 -0400)
committerTom Lane <[email protected]>
Tue, 1 Nov 2022 18:34:44 +0000 (14:34 -0400)
commitf4857082bc16f36a5cdc6f8328cdc8071bb1715e
treeb2b7778ccf59ec1f29af8172b78cbf4494a1387e
parent495e73c2079eb53fcfbafbe18b7dce81aeb271ec
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[email protected]
src/backend/utils/adt/selfuncs.c
src/test/regress/expected/stats_ext.out
src/test/regress/sql/stats_ext.sql