Re: [PG19][PATCH] Make postgres_fdw statistics import atomic

From: Nikolay Samokhvalov <nik(at)postgres(dot)ai>
To: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
Cc: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, ashutosh(dot)bapat(dot)oss(at)gmail(dot)com
Subject: Re: [PG19][PATCH] Make postgres_fdw statistics import atomic
Date: 2026-09-17 15:34:55
Message-ID: CAM527d9ojid26mgTCnCFcm_rcAJzXZi=PUbhdBjwMEVZTS1UXA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 17, 2026, Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote:
> * You imported remote stats without re-analyzing the remote table
> after the delete operation, but that isn't supported, as noted in the
> documentation; "When using this option, it is the user's
> responsibility to ensure that the existing statistics for the remote
> table are up-to-date."

Thanks Etsuro. Agreed, my reproducer violates that requirement.
I haven't reproduced this with matching types and current remote
stats, so I'll withdraw the patch for now.

Attribute stats can still affect join estimates when reltuples=0;
I tested that. But that doesn't show this needs fixing.

Nik

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2026-09-17 15:39:18 Re: [PATCH] pg_dump: Restore extension config table data before user objects during pg_upgrade
Previous Message Heikki Linnakangas 2026-09-17 15:25:58 Re: 64-bit MultiXactOffset vs. 9.3->9.4 upgrade, pg_resetwal, "wraparound" msg