pgsql: Fix recovery_prefetch with low maintenance_io_concurrency.

2022-09-08 Thread Thomas Munro
Fix recovery_prefetch with low maintenance_io_concurrency. We should process completed IOs *before* trying to start more, so that it is always possible to decode one more record when the decoded record queue is empty, even if maintenance_io_concurrency is set so low that a single earlier WAL recor

pgsql: Fix recovery_prefetch with low maintenance_io_concurrency.

2022-09-08 Thread Thomas Munro
Fix recovery_prefetch with low maintenance_io_concurrency. We should process completed IOs *before* trying to start more, so that it is always possible to decode one more record when the decoded record queue is empty, even if maintenance_io_concurrency is set so low that a single earlier WAL recor