Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAGJf-0003Mw-Fb for pgsql-performance@arkaria.postgresql.org; Tue, 07 Jun 2016 12:41:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bAGJe-0003y3-I7 for pgsql-performance@arkaria.postgresql.org; Tue, 07 Jun 2016 12:41:06 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bAGHy-00020e-De for pgsql-performance@postgresql.org; Tue, 07 Jun 2016 12:39:22 +0000 Received: from mail-oi0-x232.google.com ([2607:f8b0:4003:c06::232]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bAGHv-00038d-V8 for pgsql-performance@postgresql.org; Tue, 07 Jun 2016 12:39:21 +0000 Received: by mail-oi0-x232.google.com with SMTP id s139so34965125oie.2 for ; Tue, 07 Jun 2016 05:39:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=cM2QGgTiDGrmek1EnIqdKx2C5/sTexRu8/PwXhHHAxM=; b=VBp197rJf0GG+jGu8t0Wggn2X7V+I9Fhzy/JrjSERKtAz1BSfFvaIH/shgksHKWYl8 DsCRnR2Ln+/XVyA1RJuOksQmDkVOCE7Bnd86nAWW+MjFGY4HlU3RV0zRik27bN4ixlT1 mQn8XJWA2mPRt2eWuXpD3j3Q67+5ylX5wulQHkxQJd838VjP9H3Y2U+CwXHlKdZQhM53 rx+ZYQdbbXLkpMr22xHgBl2lA4yu71mcPM0DyY7fq4X2kRpx+Lc0rzNMUqBmYbkV/Bag U6Kq79unP5t1Kmz3yS/mMPqT0IstVGfdH1kFfgoatYJWXbuUK9rkvi6jTEPuttfTVZ7q AQ3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=cM2QGgTiDGrmek1EnIqdKx2C5/sTexRu8/PwXhHHAxM=; b=SFSErfq6JjBr6f+cJHIFnRhWGr/BLWdbokmoWUWP4jgPVozmWgrJhKSpCkQOveL580 SXoCipWPjfg7s26Hk/wCEh/+PJeg3Brinaa1OseEEt4ueDvZQ6l8h4rU8F2t69JrxBFm labDo8K2KSI0LpQ58ftl9VqSxLbU7Ek8P+csCIxCFeIwKUnQF2tD1iG5A6UaVbLknAf0 yYrpskcJKFP3FmTa4G/wAIcnkninsZornEeSwG4xih78TybODUwGTL2F9h6L+Jz48osG Hy0VDUIDqYZUjG1V3Efa9uiXi1vx/TT22lnUP3seNcgmktdC1CtFwaZwyH/jNiAp5iqs baAA== X-Gm-Message-State: ALyK8tLQEfH4Q0Cr0DOxurYg7tyM6PAQ1DSPYum8aj758WmQQSSL1our6hrLAWYoNx8tlLuOSgDtij+/FdAU1A== X-Received: by 10.157.16.93 with SMTP id o29mr5529051oto.155.1465303159141; Tue, 07 Jun 2016 05:39:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.34.104 with HTTP; Tue, 7 Jun 2016 05:39:18 -0700 (PDT) In-Reply-To: References: From: "David G. Johnston" Date: Tue, 7 Jun 2016 08:39:18 -0400 Message-ID: Subject: Re: array size exceeds the maximum allowed (1073741823) when building a json To: Nicolas Paris Cc: pgsql-performance Content-Type: multipart/alternative; boundary=001a113d0f0849fd4a0534af7ac0 X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org --001a113d0f0849fd4a0534af7ac0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, Jun 7, 2016 at 8:36 AM, Nicolas Paris wrote: > 2016-06-07 14:31 GMT+02:00 David G. Johnston = : > >> On Tue, Jun 7, 2016 at 7:44 AM, Nicolas Paris >> wrote: >> >>> Hello, >>> >>> I run a query transforming huge tables to a json document based on a pe= riod. >>> 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) >>> >>> =E2=80=8Bhttps://www.postgresql.org/about/=E2=80=8B >> >> =E2=80=8BMaximum Field Size: 1 GB=E2=80=8B >> > > It means a json cannot exceed 1GB in postgresql, right ? > =E2=80=8BYes=E2=80=8B > Then I must build it with an external tool ? > =E2=80=8B > > =E2=80=8B=E2=80=8BYou have to do something different. Using multiple colum= ns and/or multiple rows might we workable. David J. --001a113d0f0849fd4a0534af7ac0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Tue, Ju= n 7, 2016 at 8:36 AM, Nicolas Paris <niparisco@gmail.com> wrote:
2016-06-07 14:31 GMT+02:00 David G. Joh= nston <david.g.johnston@gmail.com>:
On Tue, Jun 7, 2016 at 7:44 AM, N= icolas Paris <niparisco@gm= ail.com> wrote:<= /span>
Hello,

I run a query trans= forming huge tables to a json document based on a period.
It works great= for a modest period (little dataset).
However, when increasing the per= iod (huge dataset) I get this error:
SQL ERROR[54000]
ERROR: array size exceeds the maximum al= lowed (1073741823)


=E2=80=8BMaximum Field Size: 1 GB=E2= =80=8B

It mea= ns a json cannot exceed 1GB in postgresql, right ?

=E2=80=8BYes=E2=80= =8B
=C2=A0
Then I= must build it with an external tool ?
=E2=80=8B
=C2=A0

= =E2=80=8B=E2=80=8BYou have to do something different.=C2=A0 Using multiple = columns and/or multiple rows might we workable.

David J.

--001a113d0f0849fd4a0534af7ac0--