Fix async archive-push stalling on a zero-size backup history file.
The archive-push-batch-size option converts the batch size to a segment count using the size of the first file in the ready list, but that list also contains backup and timeline history files. PostgreSQL does not sync backup history files, so a cluster copied from a storage snapshot may contain one with zero size, which caused every asynchronous run to error and prevented any WAL from being archived. Use the size of the first ready WAL segment instead and skip the batch size when no segment is ready, since the remaining files are small. A zero-size WAL segment is still an error.
A
Andrew Kroh committed
0a6b047292e08a4abe4a0eee4fa8a5ba6d68ead2
Parent: d7f54b2
Committed by GitHub <noreply@github.com>
on 9/16/2026, 6:57:13 PM