You're right about this - if the path is longer than the buffer we're bomb on the Contract.Assume.

However, this doesn't mean we have to make the PathHandler read from the socket - there's also the option of calling NpgsqlBuffer.EnsureOrAllocateTemp() instead of Ensures. This way, if the NpgsqlPath is smaller than the buffer it just does ensure, and if it's bigger than a new temp buffer is allocated.

This worst-case scenario - reading a huge NpgsqlPath in Sequential mode - seems so rare it's not worth doing the work to have it do Ensures() on its own, don't you think?