I wrote:
> Hmm. I wonder if log_newpages() is confused here:
> XLogEnsureRecordSpace(XLR_MAX_BLOCK_ID - 1, 0);
Oh, no, it's simpler than that: log_newpage_range is trying to
log zero page images, and ReserveXLogInsertLocation doesn't
like that because every WAL record should contain some data.
Will fix, thanks for report.
regards, tom lane