| From: | Corey Huinker <corey(dot)huinker(at)gmail(dot)com> |
|---|---|
| To: | Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> |
| Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com> |
| Subject: | Re: use of SPI by postgresImportForeignStatistics |
| Date: | 2026-08-19 17:15:13 |
| Message-ID: | CADkLM=dS2=HF+S1QoaFJwUJ-EpPT4-PbHzt6mCU9ykqLGgdvZA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
>
> IIUC I think what you are proposing here is:
>
> * Removing the construction of FCINFO from pg_restore_*_stats/import_*
> functions
* Removing the special handling of the version parameter
> * Renaming the argnum enum values
>
> Am I right? If so, I think these are in the order of necessity, so I
> recommend re-splitting the patchset into the three parts in the order.
> I lowered the priority of the renaming, because 1) I don't make it a
> blocker for others, and 2) I want to see how it improves things on its
> own.
>
That's what I'm proposing, but if you're saying that renaming the enums is
not desirable, then my revised proposal would be to keep the existing enum,
keep a strict ordering in the enum where all key/version parameters come
before any actual stats values, thus allowing us to pass the stats-only
portion of the nullabledatum array to the caller. We'd use an offset
technique like we do filling out tuple values/isnull/replaces arrays where
we always index by Anum_something - 1.
1. Remove special handling of version parameter, add it into existing
StatsArgInfo structures. Not the highest priority, but doing it first
remove the possibility of having to re-adjust subsequent changes related to
the offset I'm proposing.
2. Remove construction of of FCINFO, going with passing the latter portion
of the positional NullableDatum array.
>
> Also, as this is an improvement for v20, I recommend creating a new
> thread (and a new CF entry) for it.
>
Doing so now. Normally I'd start a new thread, but this one isn't that long
and carries a lot of context.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tomas Vondra | 2026-08-19 17:31:18 | Re: hashjoins vs. Bloom filters (yet again) |
| Previous Message | Andrey Borodin | 2026-08-19 16:07:55 | Re: Reduce WAL volume for heap tuple hint bits |