Re: [GENERAL] bytea size limit?

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "paulo matadr *EXTERN*" <saddoness(at)yahoo(dot)com(dot)br>
Cc: "GENERAL" <pgsql-general(at)postgresql(dot)org>, "admin" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: [GENERAL] bytea size limit?
Date: 2009-01-22 16:08:32
Message-ID: D960CB61B694CF459DCFB4B0128514C202FCC96C@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

Please don't top post.

paulo matadr wrote:
> I think identified the problem
> lts's check log below:
>
> Query:
> SELECTSTATEMENT: select relatorios0_.fuin_id as fuin5_1_, relatorios0_.rege_id as rege1_1_, relatorios0_.rege_id as r
> ege1_624_0_, relatorios0_.rege_tmultimaalteracao as rege2_624_0_, relatorios0_.rege_nnpaginas as rege3_624_0_, relatorios0_.rege_pdf as rege4_624_0_, relatorios0_.fuin_id as fui
> n5_624_0_, relatorios0_.rela_id as rela6_624_0_ from batch.relatorio_gerado relatorios0_ where relatorios0_.fuin_id in ($1, $2)
>
> Error:
> 2009-01-18 00:05:28 BRT LOG: checkpoints are occurring too frequently (25 seconds apart)
> 2009-01-18 00:05:28 BRT HINT: Consider increasing the configuration parameter "checkpoint_segments".
> gsan_comercial gcom_batch 10.1.1.5 2009-01-18 00:05:39 BRT SELECTERROR: invalid memory alloc request size 1705447581

> we need make report bigger than 200 M.
> suggestions?

I tried selecting large bytea values on my 8.3.5 system, and
I ran into similar problems; I could select a value of length 200000000
but got the same error with a value of 268435456 bytes.

I tried with psql.

Anyone knows what causes this?

I guess it might be the best approach for you to either use large objects,
which can contain up to 2GB and provide functions to read them in smaller parts,
or to change your table structure so that large values are split into
parts and stored separately...

Yours,
Laurenz Albe

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Isabella Ghiurea 2009-01-22 17:39:22 pgbouncer compilation errors
Previous Message Carol Walter 2009-01-22 15:35:22 ssl database connection problems...

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2009-01-22 16:16:46 Re: difference between current_timestamp and now() in quotes
Previous Message Raymond O'Donnell 2009-01-22 15:59:22 Re: difference between current_timestamp and now() in quotes