From: nikolay.nikitin@infowatch.com
To: pgsql-bugs@postgresql.org
Subject: BUG #14497: 1G bytea insert error
Date: Mon, 16 Jan 2017 12:57:51 +0000
Message-ID: <20170116125751.1432.67469@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: nikolay.nikitin@infowatch.com
Subject: Re: BUG #14497: 1G bytea insert error
In-Reply-To: <20170116125751.1432.67469@wrigleys.postgresql.org>
References: <20170116125751.1432.67469@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox