[PROTOCOL TODO] Permit streaming of unknown-length lob/clob (bytea,text,etc) - Mailing list pgsql-hackers

From Craig Ringer
Subject [PROTOCOL TODO] Permit streaming of unknown-length lob/clob (bytea,text,etc)
Date
Msg-id 547C10DA.7070903@2ndquadrant.com
Whole thread Raw
Responses Re: [PROTOCOL TODO] Permit streaming of unknown-length lob/clob (bytea,text,etc)
Re: [PROTOCOL TODO] Permit streaming of unknown-length lob/clob (bytea,text,etc)
List pgsql-hackers
Hi all

Currently the client must know the size of a large lob/clob field, like
a 'bytea' or 'text' field, in order to send it to the server. This can
force the client to buffer all the data before sending it to the server.

It would be helpful if the v4 protocol permitted the client to specify
the field length as unknown / TBD, then stream data until an end marker
is read. Some encoding would be required for binary data to ensure that
occurrences of the end marker in the streamed data were properly
handled, but there are many well established schemes for doing this.

I'm aware that this is possible for pg_largeobject, but this is with
reference to big varlena fields.

This would be a useful change to have in connection with the
already-TODO'd lazy fetching of large TOASTed values, as part of a
general improvement in Pg's handling of big values in tuples.

Thoughts/comments?

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Dilip kumar
Date:
Subject: Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]
Next
From: Magnus Hagander
Date:
Subject: Re: Buildfarm not happy with test module move