Re: array size exceeds the maximum allowed (1073741823) when building a json

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Nicolas Paris <niparisco(at)gmail(dot)com>
Cc: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: array size exceeds the maximum allowed (1073741823) when building a json
Date: 2016-06-07 12:58:43
Message-ID: CAKFQuwYoUjSfoEVnsngS4_eU2LxkHt-LZcUiWjpS92rxEBrv+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Jun 7, 2016 at 8:42 AM, Nicolas Paris <niparisco(at)gmail(dot)com> wrote:

>
>
> 2016-06-07 14:39 GMT+02:00 David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>:
>
>> On Tue, Jun 7, 2016 at 8:36 AM, Nicolas Paris <niparisco(at)gmail(dot)com>
>> wrote:
>>
>>> 2016-06-07 14:31 GMT+02:00 David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com
>>> >:
>>>
>>>> On Tue, Jun 7, 2016 at 7:44 AM, Nicolas Paris <niparisco(at)gmail(dot)com>
>>>> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I run a query transforming huge tables to a json document based on a period.
>>>>> It works great for a modest period (little dataset).
>>>>> However, when increasing the period (huge dataset) I get this error:
>>>>>
>>>>> SQL ERROR[54000]
>>>>> ERROR: array size exceeds the maximum allowed (1073741823)
>>>>>
>>>>> ​https://www.postgresql.org/about/​
>>>>
>>>> ​Maximum Field Size: 1 GB​
>>>>
>>>
>>> It means a json cannot exceed 1GB in postgresql, right ?
>>>
>>
>> ​Yes​
>>
>>
>>> Then I must build it with an external tool ?
>>> ​
>>>
>>>
>>
>> ​​You have to do something different. Using multiple columns and/or
>> multiple rows might we workable.
>>
>
> ​Certainly. Kind of disappointing, because I won't find any json builder
> as performant as postgresql.​
>
> ​
>
> Will this 1GO restriction is supposed to increase in a near future ?​
>
>
There has been zero chatter on the public lists about increasing any of the
limits on that page I linked to.

David J.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2016-06-07 13:03:20 Re: array size exceeds the maximum allowed (1073741823) when building a json
Previous Message Nicolas Paris 2016-06-07 12:42:28 Re: array size exceeds the maximum allowed (1073741823) when building a json