Thread

  1. Question on io_min_workers > io_max_workers semantics

    Xuneng Zhou <xunengzhou@gmail.com> — 2026-05-07T11:50:40Z

    Hi Thomas, Hackers,
    
    While looking at d1c01b79d4ae (aio: Adjust I/O worker pool
    automatically), I had a question about the intended semantics for
    io_min_workers > io_max_workers.
    
    Both GUCs currently have independent 1..MAX_IO_WORKERS range checks,
    so a configuration such as:
    
    io_min_workers = 32 io_max_workers = 1
    
    is accepted. In maybe_start_io_workers_scheduled_at(), the
    io_max_workers check comes first, so io_max_workers effectively caps
    the minimum:
    
    if (io_worker_count >= io_max_workers) return 0;
    if (io_worker_count < io_min_workers) return TIMESTAMP_MINUS_INFINITY;
    
    Is that intended? If so, should we document that the effective minimum
    is capped by io_max_workers, or perhaps emitting a warning similar to
    the autovacuum_max_workers / autovacuum_worker_slots case?
    
    -- 
    Best,
    Xuneng