On Fri, Sep 4, 2026 at 6:51 PM Etsuro Fujita <[email protected]> wrote:
>
> On Thu, Sep 3, 2026 at 7:45 PM Etsuro Fujita <[email protected]> wrote:
> > Here is a new version of the patch, in which I fixed indentation after
> > tweaking comments/docs a little bit for clarity/readability.  I will
> > push/backpatch this version if no objections.
>
> Done.

After the patch was committed, I observed that stats import could fail with
the following warning even though the remote table is no longer
inherited. Is this behavior intentional?

    WARNING:  could not import statistics for foreign table
"public.ft" --- remote table "public.t" is inherited

Here is the procedure to reproduce this situation. The point is that
the inheritance table is created and then dropped:

--------------------------------
CREATE TABLE t AS SELECT i FROM generate_series(1, 100) i;
ANALYZE t;
CREATE TABLE tt () INHERITS (t);
DROP TABLE tt;

CREATE EXTENSION postgres_fdw;
CREATE SERVER loopback FOREIGN DATA WRAPPER postgres_fdw;
CREATE USER MAPPING FOR public SERVER loopback;
CREATE FOREIGN TABLE ft (i int) SERVER loopback OPTIONS (table_name
't', import_stats 'true');

ANALYZE VERBOSE ft;
WARNING:  could not import statistics for foreign table "public.ft"
--- remote table "public.t" is inherited
--------------------------------

Regards,

-- 
Fujii Masao


Reply via email to