Re: BUG #17932: Cannot select big bytea values(>500MB)

Поиск
Список
Период
Сортировка
От John Naylor
Тема Re: BUG #17932: Cannot select big bytea values(>500MB)
Дата
Msg-id CAFBsxsFZ+NDhuyj8aAOpXzyuDq_ZU6XB6h8oGumjJ8DgLyb1=Q@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #17932: Cannot select big bytea values(>500MB)  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #17932: Cannot select big bytea values(>500MB)  (duc hiep ha <haduchiep@googlemail.com>)
Список pgsql-bugs
On Mon, May 15, 2023 at 5:21 PM PG Bug reporting form <noreply@postgresql.org> wrote:

> I created a big bytea value and try to select it from a table, I get
> an error, something like: "ERROR:  invalid memory alloc request size
> ...".
> it means i can insert data into table but then i can't even work
> with it. is it a bug? could you please help me to solve this Problem.
> Thank you very much for your support

This is a known (but not documented as far as I know) issue, but it also depends on the data contents and how the value is retrieved. Possible workarounds:

1. If the data is largely printable ASCII, then try
setting "bytea_output" to "escape":

https://www.postgresql.org/docs/devel/runtime-config-client.html#GUC-BYTEA-OUTPUT

2. Request binary transmission in your application (if possible), for example "show_binary_results" in

https://www.postgresql.org/docs/devel/libpq-example.html

3. COPY out using binary format

--
John Naylor
EDB: http://www.enterprisedb.com

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)
Следующее
От: Manika Singhal
Дата:
Сообщение: Re: BUG #17931: Faild to stop PostgresSQL Service