On Sun, Apr 5, 2026 at 8:05 PM Etsuro Fujita <etsuro.fujita@gmail.com> wrote:
> On Sat, Apr 4, 2026 at 1:01 AM Corey Huinker <corey.huinker@gmail.com> wrote:
> >> One thing I'm wondering is: we should rename ImportStatistics to
> >> ImportForeignStatistics, for consistency with ImportForeignSchema?
>
> > ImportForeignStatistics makes sense to me.
>
> Will rename.
Done.
> >> Also, we should rename fetch_stats to import_stats, for consistency
> >> with eg, import_default?
>
> > restore_stats is probably the better name, given that it is calling the pg_restore_*() functions.
>
> That sounds better, so will rename.
Done.
Here are other changes:
* I removed the implementation details from the docs in
postgres-fdw.sgml, as I think it is overly technical for
postgres-fdw.sgml, which is intended for end users. Also, I added a
note about resorting to sampling if stats import failed, and another
note about the user's responsibility to ensure that remote stats are
up-to-date.
* I added the docs about the new callback routine to fdwhandler.sgml.
* I added/tweaked comments.
* I Added one more test case.
* I did further cleanup and editorialization.
I think the patch is committable, so I will push it if no objections.
(Maybe we could add/improve some more comments, but I think we could
do that later if needed.)
Best regards,
Etsuro Fujita