pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: nikolay.nikitin@infowatch.com
To: pgsql-bugs@postgresql.org
Subject: BUG #14499: pg_dump error on the table with 512M or bigger bytea values
Date: Mon, 16 Jan 2017 13:37:33 +0000
Message-ID: <20170116133733.1434.98556@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:      14499
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 made test table with one bytea column and insert one record with 512M
or bigger value.

drop table if exists test;

create table test 
(
	blob bytea
);

insert into test(blob) select string_agg(gen_random_bytes(1024),
null::bytea)::bytea from generate_series(1, 1024 * 512) g;

Try to dump table:

su postgres -c "rm -rf /tmp/test && mkdir /tmp/test && pg_dump -p 5432 -U
postgres -Fd -f /tmp/test -t test postgres"

pg_dump: Dumping the contents of table "test" failed: PQgetResult()
failed.
pg_dump: Error message from server: ERROR:  invalid memory alloc request
size 1073741827
pg_dump: The command was: COPY public.test (blob) TO stdout;


If I create table with one 511M bytea value then dump works without
errors.
But I want to dump tables with many 1G bytea values.

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


Message-ID: <20170116133733.1434.98556@wrigleys.postgresql.org>
Permalink:  ../20170116133733.1434.98556@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20170116133733.1434.98556@wrigleys.postgresql.org

 · 

reply

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 #14499: pg_dump error on the table with 512M or bigger bytea values
  In-Reply-To: <20170116133733.1434.98556@wrigleys.postgresql.org>
  References: <20170116133733.1434.98556@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