Обсуждение: BUG #4804: ERROR out of memory on select bytea field legth about 120Mb

Поиск
Список
Период
Сортировка

BUG #4804: ERROR out of memory on select bytea field legth about 120Mb

От
"Vadim Fedorenko"
Дата:
The following bug has been logged online:

Bug reference:      4804
Logged by:          Vadim Fedorenko
Email address:      junk@fromru.com
PostgreSQL version: 8.3.3
Operating system:   Windows 2003 Server R2 64bit
Description:        ERROR out of memory on select bytea field legth about
120Mb
Details:

Hi!

I have a database about 4Gb and pg_dump fails with

ERROR:  out of memory
DETAIL:  Failed on request of size 536870912.

on it.

I found out that it fails on selecting bug bytea field:

select length(binarydata) from config where datasize >120000000
results 138124811

and

select binarydata from config where datasize >120000000

results
ERROR:  out of memory
DETAIL:  Failed on request of size 536870912.

how can I workaround this?

Re: BUG #4804: ERROR out of memory on select bytea field legth about 120Mb

От
Tom Lane
Дата:
"Vadim Fedorenko" <junk@fromru.com> writes:
> I have a database about 4Gb and pg_dump fails with

> ERROR:  out of memory
> DETAIL:  Failed on request of size 536870912.

> I found out that it fails on selecting bug bytea field:

Huh, how did you get that value into the table in the first place?

> how can I workaround this?

Increase the memory limit the postmaster runs under.  If it's
a 32-bit machine, you might need to decrease shared_buffers
so there's more address space available as workspace.

            regards, tom lane