Re: postgres_fdw: statistics import can silently fall back to sampling across encodings

From: Baji Shaik <baji(dot)pgdev(at)gmail(dot)com>
To: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: postgres_fdw: statistics import can silently fall back to sampling across encodings
Date: 2026-12-02 14:35:33
Message-ID: CA+fm-RNAarcdUqSm0wa8Eo-5dPbbrMtGdcGnae5EbcxJR+GxhA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Etsuro,

On Wed, Dec 2, 2026 at 5:31 AM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
wrote:

> * IMO I think the file name "encoding_mismatch.pl" is vague about what
> it tests. How about renaming it to "stats_import.pl"?
>
> I updated the patch as above. Attached is an updated version of the
> patch, in which I also updated some comments and the documentation.
>

Thanks for the review and the updated patch. I agree with all the
changes.

I tested it on master. make check in contrib/postgres_fdw passes,
including the new stats_import.pl. With an EUC_JP remote and a UTF-8
local database, a table with non-ASCII column names now falls back to
sampling with the warning, and one with ASCII names still imports its
statistics.

One nitpick: there's a typo in the new warning, "beccause" should be
"because".

Thanks,
Baji Shaik

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Burd 2026-12-02 15:18:27 Re: nbtree: opt-in leaf key prefix compression
Previous Message Matheus Alcantara 2026-12-02 14:32:10 Re: extension_control_path: ignore empty elements and deduplicate directories