Re: Further cleanup related to statistics import support in postgres_fdw - Mailing list pgsql-hackers

From Etsuro Fujita
Subject Re: Further cleanup related to statistics import support in postgres_fdw
Date
Msg-id CAPmGK17XWjgOd0MZia0mu1Z+-kO+osaLhf+pBefiL4KWRbLUqw@mail.gmail.com
Whole thread
List pgsql-hackers
On Sun, Sep 6, 2026 at 7:45 PM Etsuro Fujita <etsuro.fujita@gmail.com> wrote:
> On Sat, Sep 5, 2026 at 1:23 AM Etsuro Fujita <etsuro.fujita@gmail.com> wrote:
> > We are really nearing the end of the beta stabilization phase, I feel
> > like just adding the note like this:
> >
> > "Note that if the remote table was inherited in the past, postgres_fdw
> > currently considers it inherited even if it is not currently
> > inherited.  This restriction might be fixed in a future release."
>
> I expanded this to something like the attached.

Upon reconsideration, I think it's better to adjust the WARNING
message like this, rather than just adding the lengthy note.

                ereport(WARNING,
                                errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                               errmsg("could not import statistics
for foreign table \"%s.%s\" --- remote table \"%s.%s\" is inherited",
+                               errmsg("could not import statistics
for foreign table \"%s.%s\" --- remote table \"%s.%s\" is (or was
once) inherited",
                                           local_schemaname, local_relname,
                                           remote_schemaname, remote_relname));

Attached is an updated patch for that, in which I simplified a near-by
code comment as well as that note.  Comments welcome!

Best regards,
Etsuro Fujita

Attachment

pgsql-hackers by date:

Previous
From: Henson Choi
Date:
Subject: Re: Row pattern recognition
Next
From: Amit Kapila
Date:
Subject: Re: Crashes on a partition whose concurrent detach never finished