Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> Here's a patch, based in part on some off-list discussion with Andres.
> I believe Andres has already confirmed that this fix works, but it
> wouldn't hurt if Tom wants to verify it also.
WFM too --- at least, pg_basebackup's "make check" passes now.
regards, tom lane