Re: Import Statistics in postgres_fdw before resorting to sampling.
Corey Huinker <corey.huinker@gmail.com>
From: Corey Huinker <corey.huinker@gmail.com>
To: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Cc: Etsuro Fujita <etsuro.fujita@gmail.com>,
Michael Paquier <michael@paquier.xyz>, pgsql-hackers@postgresql.org, jkatz@postgresql.org, nathandbossart@gmail.com
Date: 2026-01-21T20:51:23Z
Lists: pgsql-hackers
Attachments
- v11-0001-Add-FDW-functions-for-importing-optimizer-statis.patch (text/x-patch) patch v11-0001
- v11-0002-Add-remote-statistics-fetching-to-postgres_fdw.patch (text/x-patch) patch v11-0002
- v11-0003-Add-remote_analyze-to-postgres_fdw-remote-statis.patch (text/x-patch) patch v11-0003
> > Changes in this release, aside from rebasing: > > - The generic analyze and fdw.h changes are in their own patch (0001) that > ignores contrib/postgres_fdw entirely. > - The option for remote_analyze has been moved to its own patch (0003). > - The errors raised are now warnings, to ensure that we can always fall > back to row sampling. > - All local attributes with attstatarget > 0 must get matching remote > statistics or the import is considered a failure. > - The pg_restore_attribute_stats() call has been turned into a prepared > statement, for clarity and some minor parsing savings. > - The calls to pg_restore_relation_stats() are parameterized, but not > prepared as this is rarely called more than once. > - postgresStatisticsAreImportable will now disqualify a table if has > extended statistics objects, because we can't compute those without a row > sample. > Rebase
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
postgres_fdw: Replace buffers in RemoteAttributeMapping with pointers.
- aa1f93a3387a 19 (unreleased) landed
-
Add support for importing statistics from remote servers.
- 28972b6fc3dc 19 (unreleased) landed