On Thu, Jun 18, 2026 at 5:23 PM Corey Huinker <[email protected]> wrote: > To be clear, this solves the SPI problem, but questions about the design of > attribute_statistics_update() and relation_statistics_update() remain, but > those concerns are now isolated within their respective files > attribute_stats.c and relation_stats.c. The inefficiencies therein aren't > really in a critical path, so if we wanted to leave them be until v20 they > could, but if time allows I'd at least like try unwinding some of that. But > first, let's get SPI out of postgres_fdw.c.
I think that's the right order of priority, but I don't think that having import_attribute_statistics construct an fcinfo is great. Ideally, attribute_statistics_update would call import_attribute_statistics rather than the other way around. -- Robert Haas EDB: http://www.enterprisedb.com
