On Monday, October 11, 2021, PG Doc comments form <nore...@postgresql.org> wrote:
> > Foreign tables are analyzed only when explicitly selected. > > 2. When I run the analyze command with the FDW table as a parameter > > That > Also, I am not clear if analyze is run on FDW tables when Automvacuum runs; > does it run analyze on FDW tables by default. > Based on the prior item I would expect no. It would usually have insufficient data to do otherwise. I didn’t look hard but aside from this comment about analyze working on foreign tables, if asked, I find no relevant “why” discussion regarding the interaction of analyze and foreign tables in the documentation. Frankly, I’m unsure why it even needs to work at all. David J.