I wrote:
> Yeah. The intent of the protocol design was that the recipient could
> skip over the correct number of bytes even if it didn't have room to
> buffer them, but the memory allocation mechanism in the backend makes
> it difficult to actually do that. Now that we have PG_TRY, though,
> it might not be out of reach to do it right.
And indeed it wasn't. Patch committed.
regards, tom lane