The following bug has been logged on the website:
Bug reference: 14497
Logged by: Nikolay Nikitin
Email address: nikolay.nikitin@infowatch.com
PostgreSQL version: 9.4.10
Operating system: Red Hat Enterprise Linux Server release 6.7
Description:
Hi! I try to insert 1G bytea value into the simple table and get the
error.
drop table if exists test;
create table test
(
blob bytea
);
insert into test(blob) select string_agg(gen_random_bytes(1024 - case when g
= 1024 then 52 else 0 end), null::bytea)::bytea from generate_series(1, 1024
* 1024) g;
ERROR: invalid memory alloc request size 1073741824
********** Ошибка **********
ERROR: invalid memory alloc request size 1073741824
SQL-состояние: XX000
Value equal or greater 1G-52 raises the error. But smaller value inserts
without errors.
insert into test(blob) select string_agg(gen_random_bytes(1024 - case when g
= 1024 then 53 else 0 end), null::bytea)::bytea from generate_series(1, 1024
* 1024) g;
Query returned successfully: one row affected, 02:04 minutes execution
time.
I think 1G has to be inserted without errors.
Regards, Nikolay.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs