Re: use of SPI by postgresImportForeignStatistics

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
Cc: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: use of SPI by postgresImportForeignStatistics
Date: 2026-06-29 18:17:02
Message-ID: CA+TgmoZd5MDhcx6uav6MWxhM42yWcfaRAHYKNtNkuog=yrKAgw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 29, 2026 at 7:50 AM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote:
> I like this refactoring, but while it's rather mechanical, it's pretty
> large, so I think it's too late to do the refactoring at this time
> just before the beta 2 release. So I'd vote for going with your
> v1-0001 and v1-0002 and doing the refactoring in v20. As mentioned by
> Robert, I don't think it's good to call LOCAL_FCINFO() in
> import_relation_statistics() and import_attribute_statistics() to call
> the guts of those functions either, but that is *consistent* with the
> existing way pg_restore_relation_stats() and
> pg_restore_attribute_stats() do that, so that is actually not that
> bad. Also, as you mentioned above, it's inefficient for the new API
> functions to lock an already-locked relation, and validate an
> already-validated attname/attnum, but I think it would be negligible.

Fujita-san, is it then your plan to get those two patches committed?

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message surya poondla 2026-06-29 18:53:27 Re: [BUG] Take a long time to reach consistent after pg_rewind
Previous Message Robert Haas 2026-06-29 18:13:59 Re: implement CAST(expr AS type FORMAT 'template')