Re: Import Statistics in postgres_fdw before resorting to sampling.
Corey Huinker <corey.huinker@gmail.com>
From: Corey Huinker <corey.huinker@gmail.com>
To: Etsuro Fujita <etsuro.fujita@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>,
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, pgsql-hackers@postgresql.org, jkatz@postgresql.org, nathandbossart@gmail.com
Date: 2025-12-14T20:01:35Z
Lists: pgsql-hackers
> > Ah, I mean the case where the foreign table is an inheritance parent > on the *local* side. In that case, the return would cause us to skip > the recursive ANALYZE (i.e., do_analyze_rel() with inh=true), leading > to no inherited stats. I agree that the case is minor, but I don't > think that that's acceptable. > When such a corner case occurs (stats import configured to true, but table is an inheritance parent), should we raise an error, or raise a warning and return false on the CanImportStats() call? I guess the answer may depend on the feedback we get.