Re: fetching bytea (blob) data of 850 MB from psql client failed

From: Noah Misch <noah(at)leadboat(dot)com>
To: jitesh tiwari <jitesh120(at)gmail(dot)com>, John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: fetching bytea (blob) data of 850 MB from psql client failed
Date: 2022-09-01 04:39:13
Message-ID: 20220901043913.GA1001056@rfd.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Aug 22, 2022 at 05:52:29PM +0700, John Naylor wrote:
> If the data is binary and not printable ASCII, then there is no easy
> workaround.

I would say the chief solution is to request binary transmission in your
application. This cuts your network traffic in half for retrieving a bytea,
so it's a good change even if the server improves someday. If you're using
libpq, search for show_binary_results in
https://www.postgresql.org/docs/devel/libpq-example.html to see an example of
doing this. I don't know of an equivalent option in ODBC; if there is none,
one could modify the ODBC driver to use the same protocol feature that libpq
uses.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Polina Bungina 2022-09-01 11:33:09 Re: pg_rewind WAL segments deletion pitfall
Previous Message Bruce Momjian 2022-09-01 02:05:46 Re: BUG #17349: Function gen_random_uuid duplicates in pgcrypto and core