Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oB8yv-0001QL-RG for pgsql-admin@arkaria.postgresql.org; Tue, 12 Jul 2022 06:02:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oB8yu-0005zf-LX for pgsql-admin@arkaria.postgresql.org; Tue, 12 Jul 2022 06:02:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oB8yu-0005zW-7f for pgsql-admin@lists.postgresql.org; Tue, 12 Jul 2022 06:02:48 +0000 Received: from forward500j.mail.yandex.net ([5.45.198.250]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oB8ys-00069c-0L for pgsql-admin@lists.postgresql.org; Tue, 12 Jul 2022 06:02:47 +0000 Received: from iva1-cf747c9a36c8.qloud-c.yandex.net (iva1-cf747c9a36c8.qloud-c.yandex.net [IPv6:2a02:6b8:c0c:9282:0:640:cf74:7c9a]) by forward500j.mail.yandex.net (Yandex) with ESMTP id 843446CB6673; Tue, 12 Jul 2022 09:02:43 +0300 (MSK) Received: from iva7-f62245f79210.qloud-c.yandex.net (iva7-f62245f79210.qloud-c.yandex.net [2a02:6b8:c0c:2e83:0:640:f622:45f7]) by iva1-cf747c9a36c8.qloud-c.yandex.net (mxback/Yandex) with ESMTP id c7CAD5ZXWs-2hfmvaSA; Tue, 12 Jul 2022 09:02:43 +0300 X-Yandex-Fwd: 2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1657605763; bh=+5YkUd8nzJHyYpeG6yYJ6HwRGgD24hVIqyVyym1X+OA=; h=In-Reply-To:From:Cc:Date:References:To:Subject:Message-ID; b=fUQKd4FYMUPfyfbC3lnJ3jTQKwBJODBHCxVJHqroIupGzIFIDSl/eBeDYt4sP+IIg tsMb3kVkFBJh6AtS8Q9CHeN0BfbhQ7D1+pJYy/KgslmHYesb4dl+YbiQ61S6J5Vw+6 5XCxJvbPVdGMEsFqGKO0nn018+ZwGuQW2jobIBSM= Authentication-Results: iva1-cf747c9a36c8.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Received: by iva7-f62245f79210.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id CxNJ6L3Umx-2gei9eTv; Tue, 12 Jul 2022 09:02:42 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) Subject: Re: Storing large large JSON objects in JSONB To: Thomas Kellerer , pgsql-admin@lists.postgresql.org Cc: Wells Oliver References: <16681dbd-639c-0d38-d3ee-28c808c05a4d@gmx.net> From: Aleksey M Boltenkov Message-ID: Date: Tue, 12 Jul 2022 09:02:42 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 07/11/22 20:49, Thomas Kellerer wrote: > > Wells Oliver schrieb am 11.07.2022 um 18:25: >>> On Mon, Jul 11, 2022 at 5:11 AM Thomas Kellerer >> > wrote: >>> >>>     Wells Oliver schrieb am 09.07.2022 um 21:37: >>>      > We have a couple of tables where we like to store very large >>> JSON >>>      > objects in a JSONB column. >>>     Note, that the upper limit for a single jsonb value is 255MB >>>     Not 1GB as it is e.g. the case for text or json. > >> What exactly does that mean? The upper limit at which TOAST is used >> for storage, or what? We certainly have objects larger than 256MB in >> JSONB columns. > Hmm, that's strange, because when I try to create a JSONB value that is > larger than 256MB I get the following error: > >    ERROR: total size of jsonb object elements exceeds the maximum of > 268435455 bytes > > Are you sure you are using jsonb, not json maybe? > To my knowledge the json data type does not have this limit. > > > > Wow! We are using citus for storing likely objects. 256MB. My opinion is you are doing something wrong.