Re: A bug in recovery prefetcher, triggering asserts / FATAL: checkpoint request failed

From: Tomas Vondra <tomas(at)vondra(dot)me>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: surya poondla <suryapoondla4(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, shihao zhong <zhong950419(at)gmail(dot)com>
Subject: Re: A bug in recovery prefetcher, triggering asserts / FATAL: checkpoint request failed
Date: 2026-11-20 01:54:50
Message-ID: f76181af-a5ab-4d47-b3a9-da565cedfc7f@vondra.me
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/20/26 01:14, Fujii Masao wrote:
> On Fri, Nov 20, 2026 at 8:22 AM Tomas Vondra <tomas(at)vondra(dot)me> wrote:
>> What's a good way to check if a machine supports posix_fadvise? I don't
>> see any TAP test already doing that. I guess we could try assigning into
>> effective_io_concurrency, and skip the test if it fails.
>
> In v18 and later, setting effective_io_concurrency would succeed even on
> the platform not supporting posix_fadvise(), such as Windows?
> If so, checking recovery_prefetch = on might be a better approach?
> Because its check hook, check_recovery_prefetch(), seems to always
> return false when USE_PREFETCH is not enabled.
>

Actually, there's an easier way. We already have check_pg_config(), so
we can do just this:

# Prefetching requires posix_fadvise(). Without it, the server rejects the
# non-zero maintenance_io_concurrency this test relies on.
if (!check_pg_config("#define HAVE_POSIX_FADVISE 1"))
{
plan skip_all => 'posix_fadvise() not supported by this platform';
}

Will push the fix in the morning.

--
Tomas Vondra

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Keyerror Smart 2026-11-20 01:55:43 Re: [PATCH]Fix planner's strictness check for JsonExpr
Previous Message Bharath Rupireddy 2026-11-20 01:49:12 Re: Use WALReadFromBuffers in more places