• Tom Lane's avatar
    Use OpenSSL's SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag. · d0c23026
    Tom Lane authored
    This disables an entirely unnecessary "sanity check" that causes failures
    in nonblocking mode, because OpenSSL complains if we move or compact the
    write buffer.  The only actual requirement is that we not modify pending
    data once we've attempted to send it, which we don't.  Per testing and
    research by Martin Pihlak, though this fix is a lot simpler than his patch.
    
    I put the same change into the backend, although it's less clear whether
    it's necessary there.  We do use nonblock mode in some situations in
    streaming replication, so seems best to keep the same behavior in the
    backend as in libpq.
    
    Back-patch to all supported releases.
    d0c23026
be-secure.c 26.7 KB