plugin-barman-cloud
plugin-barman-cloud copied to clipboard
Prefetched WAL segments are not returned until the whole batch finishes
wal.maxParallel already downloads the requested WAL segment and the following ones together. RestoreList waits for every download before it returns the requested segment, so PostgreSQL cannot start redo on that segment while the later ones are still transferring.
On a store where each signed GET spends about 510 ms before the first byte, that wait is visible on every segment. Returning the requested segment as soon as it is in the spool or has been downloaded, and continuing the next downloads in the background, lets redo overlap the following transfers.
Depends on the wal.prefetch field and PrefetchIntoSpool added in cloudnative-pg/barman-cloud#319.