Re: out of memory

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: mahavir(dot)trivedi(at)gmail(dot)com
Cc: pgsql-performance(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: out of memory
Date: 2012-10-30 10:08:59
Message-ID: 20121030.190859.2262955278129522321.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

> i have sql file (it's size are 1GB )
> when i execute it then the String is 987098801 bytr too long for encoding
> conversion error occured .
> pls give me solution about

You hit the upper limit of internal memory allocation limit in
PostgreSQL. IMO, there's no way to avoid the error except you use
client encoding identical to backend.

Hackers:
The particular limit seem to be set considering TOAST(from
include/utils/memutils.h):

* XXX This is deliberately chosen to correspond to the limiting size
* of varlena objects under TOAST. See VARSIZE_4B() and related macros
* in postgres.h. Many datatypes assume that any allocatable size can
* be represented in a varlena header.

IMO the SQL string size limit is totally different from
TOAST. Shouldn't we have different limit for SQL string?
(MAX_CONVERSION_GROWTH is different story, of course)
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message crocket 2012-10-30 12:37:14 What are the advantages of not being able to access multiple databases with one connection?
Previous Message Mahavir Trivedi 2012-10-30 09:14:49 out of memory

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Grittner 2012-10-30 11:55:54 Re: How to keep queries low latency as concurrency increases
Previous Message Heikki Linnakangas 2012-10-30 10:07:48 Re: Replaying 48 WAL files takes 80 minutes