Re: use of SPI by postgresImportForeignStatistics - Mailing list pgsql-hackers

From Robert Haas
Subject Re: use of SPI by postgresImportForeignStatistics
Date
Msg-id CA+TgmoZdTVeXRQo__cEr_1y+mUO9nubOX=6PEfw7Cr0UfZQn6w@mail.gmail.com
Whole thread
In response to Re: use of SPI by postgresImportForeignStatistics  (Corey Huinker <corey.huinker@gmail.com>)
Responses Re: use of SPI by postgresImportForeignStatistics
List pgsql-hackers
On Thu, Jun 18, 2026 at 5:23 PM Corey Huinker <corey.huinker@gmail.com> 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
andrelation_stats.c. The inefficiencies therein aren't really in a critical path, so if we wanted to leave them be
untilv20 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



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: PG20 Minimum Dependency Thread
Next
From: Fujii Masao
Date:
Subject: Re: Fix publisher-side sequence permission reporting