Skip to content

Support higher maximum blob segment size #1197

@mrotteveel

Description

@mrotteveel

Currently, the blob segment size is controlled by the connection property PacketSize, and this has a maximum value of 32767 (bytes). However, since Firebird 2.1, segment sizes of 64KiB - 1 are supported (though Firebird 2.1 and 2.5 have some issues because sometimes the value is cast to a SSHORT, as far as I know, Firebird 3.0 is the first where it really works).

There are some oddities with this maximum, because for op_get_segment the maximum is also the maximum size of the buffer used for transferring, so the largest value you can receive with op_get_segment when asking for 65535 is actually 65533 (and if the response is broken up in multiple segments, it can even be multiples of 2 shorter) because of the 2-byte length prefixes in the response buffer. When sending (op_put_segment), the maximum is 65535 bytes.

Support a larger maximum value, so blobs can be transferred more efficiently, at least for Firebird 3.0 and higher, and also consider deprecating PacketSize, and/or introduce an alternative property called BlobSegmentSize, as that seems to be the only thing controlled by PacketSize.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @cincuranet@mrotteveel

      Issue actions

        Support higher maximum blob segment size · Issue #1197 · FirebirdSQL/NETProvider