Re: Out of memory error with PG10.3, 10.4 but not 9.3.19

Поиск
Список
Период
Сортировка
От Peter J. Holzer
Тема Re: Out of memory error with PG10.3, 10.4 but not 9.3.19
Дата
Msg-id 20180518102516.3gv64eoek7o7qpau@hjp.at
обсуждение исходный текст
Ответ на Out of memory error with PG10.3, 10.4 but not 9.3.19  (ChatPristi <cchristo_0899@yahoo.fr>)
Список pgsql-general
On 2018-05-15 15:02:48 +0000, ChatPristi wrote:
> I have a SELECT command (in partitionned tables) that failed with:
> psql:/tmp/query.txt:1: ERROR:  out of memory
> DETAIL:  Cannot enlarge string buffer containing 1073741818 bytes by 32 more
> bytes.

1073741818 is a bit less than 1GB and 1073741818+32 is a bit more. So
you are obviously hitting a 1GB limit here.

Given that 1GB is the maximum length of a character type value in
PostgreSQL and the error message mentions a "string buffer", I suspect
that your query tries to construct a very long string. Try to rewrite
the query so that it creates several shorter strings instead.

        hp




--
   _  | Peter J. Holzer    | we build much bigger, better disasters now
|_|_) |                    | because we have much more sophisticated
| |   | hjp@hjp.at         | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Importing data from CSV into a table with array and composite types
Следующее
От: Vick Khera
Дата:
Сообщение: Re: When use triggers?