Re: use of SPI by postgresImportForeignStatistics

From: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
To: Corey Huinker <corey(dot)huinker(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-11 10:15:49
Message-ID: CAPmGK14X47KJ1dPrb7msk0f2xPPwq98NXo8365+arvPrfx7chg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 11, 2026 at 4:58 AM Corey Huinker <corey(dot)huinker(at)gmail(dot)com> wrote:
> On Mon, Aug 10, 2026 at 6:45 AM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote:
>> On Tue, Aug 4, 2026 at 7:48 AM Corey Huinker <corey(dot)huinker(at)gmail(dot)com> wrote:
>> > There has been some time for v19 dust to settle, so I've taken the work I had done in the v2 patch set above, re-based that, and modified the end result to use named parameters over arg arrays of differing lengths depending on the purpose per Fujita-san's work, and tried to keep those changes in the same very small layered steps for easier reviewing.
>>
>> As I said before, this is a pretty large change (and is actually an
>> issue since v18 in part), so it's too late to do it at this stage.
>> IIUC we are nearing the end of the stabilization phase for v19.
>
> Sorry if I wasn't clear, this is all for v20. If there was a chance that we wanted any of this for v19 I would have worked on it earlier, but at the time I got the sense that we wanted the most minimal viable change for 19, so I intentionally stopped there.

Understood. I'll return to the below later. Thanks for the answer!

There is one thing I'd like to change for v19: the name of the option
for this feature. We named it restore_stats because it used the
pg_restore_*() functions [1], but it doesn't use them anymore; it uses
import_*_statistics() instead, so I think we should rename it to
import_stats if not too late. I think it also matches the names of
functions added to postgres_fdw.c like import_fetched_statistics().
What do you think?

Best regards,
Etsuro Fujita

[1] https://www.postgresql.org/message-id/CAPmGK15kq8L51wKuZKC9sCbfUNVcNwLTqi55nimgD1Jz3C-3vQ%40mail.gmail.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2026-08-11 10:23:03 Re: Crash issue in PG18.5 regression
Previous Message Amit Kapila 2026-08-11 10:13:22 Re: Proposal: Conflict log history table for Logical Replication