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

From: Andres Freund <andres(at)anarazel(dot)de>
To: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
Cc: Nikolay Samokhvalov <nik(at)postgres(dot)ai>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, etsuro(dot)fujita(at)gmail(dot)com, ashutosh(dot)bapat(dot)oss(at)gmail(dot)com
Subject: Re: [PG19][PATCH] Make postgres_fdw statistics import atomic
Date: 2026-09-18 17:10:32
Message-ID: rjuaaeih3zniuoz5yoae7wwdobko5smqh5ytoudyish7udwtjz@rbtoai4kbc4r
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2026-09-16 16:45:26 -0400, Corey Huinker wrote:
> And how would the first foreign table handle this if we fixed the records
> in a way that didn't also leave the table empty?
>
> # UPDATE remote_t SET b = 4;
> UPDATE 2
> # analyze ft;
> WARNING: invalid input syntax for type integer: "bad-x"
> WARNING: could not import statistics for foreign table "public.ft" ---
> attribute statistics import failed for column "b" of this foreign table

What is the defense of making all these warnings rather than errors? It's one
thing to e.g. warn that analyze skipped a relation due to locks, but doing
some catalog updates but not doing everything that the catalog updates
depended on seems like a really bad idea. Transactions exist for a reason...

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2026-09-18 17:11:46 Re: Regression tests failures due to concurrent grants
Previous Message Jacob Champion 2026-09-18 17:05:21 Re: Regression tests failures due to concurrent grants