Re: [PERFORM] out of memory - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: [PERFORM] out of memory
Date
Msg-id 20121030.190859.2262955278129522321.t-ishii@sraoss.co.jp
Whole thread Raw
Responses Re: [PERFORM] out of memory  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
> 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


pgsql-hackers by date:

Previous
From: jesper@krogh.cc
Date:
Subject: Re: WIP checksums patch
Next
From: crocket
Date:
Subject: What are the advantages of not being able to access multiple databases with one connection?