Re: file_fdw: Fix ANALYZE does not enforce REJECT_LIMIT with on_error 'ignore'

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Ayoub Kazar <ayoub(dot)kazar(at)data-bene(dot)io>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: file_fdw: Fix ANALYZE does not enforce REJECT_LIMIT with on_error 'ignore'
Date: 2026-11-05 15:24:00
Message-ID: CAHGQGwET_73iyGZbELi9TTwg0-+tFXid3t_KpQOVXvDxf_59gQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 5, 2026 at 9:40 AM Ayoub Kazar <ayoub(dot)kazar(at)data-bene(dot)io> wrote:
> However, ANALYZE silently ignores reject_limit, skips all
> malformed rows, and finishes with a NOTICE.

Personally, I'd prefer to keep this behavior. Statistics based on valid rows
are still useful even when the number of errors exceeds reject_limit.
Queries may still succeed, for example, when using LIMIT, whereas
aborting ANALYZE would leave the statistics outdated. So I think
ANALYZE should continue to ignore reject_limit. Thought?

If we agree, how about documenting this exception and adding a comment
in file_acquire_sample_rows() explaining why reject_limit is not enforced?

Regards,

--
Fujii Masao

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2026-11-05 15:25:01 Re: Teach pg_upgrade to deal with invalid databases
Previous Message Heikki Linnakangas 2026-11-05 15:10:43 Re: Remove obsolete locking comment from AddBufferToRing()