Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gMrlO-0003k0-Ro for pgsql-bugs@arkaria.postgresql.org; Wed, 14 Nov 2018 09:47:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gMrlM-000158-E4 for pgsql-bugs@arkaria.postgresql.org; Wed, 14 Nov 2018 09:47:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gMqAT-0002Xg-Od for pgsql-bugs@lists.postgresql.org; Wed, 14 Nov 2018 08:04:57 +0000 Received: from [124.133.18.218] (helo=EX01.highgo.com) by magus.postgresql.org with esmtps (TLS1.0:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gMqAP-000264-41 for pgsql-bugs@lists.postgresql.org; Wed, 14 Nov 2018 08:04:56 +0000 Received: from MM7W91005DUDZZI (192.168.100.145) by EX02.highgo.com (192.168.110.195) with Microsoft SMTP Server (TLS) id 15.0.847.32; Wed, 14 Nov 2018 16:13:56 +0800 Date: Wed, 14 Nov 2018 16:04:59 +0800 From: "lichuancheng@highgo.com" To: Michael Paquier , "pgsql-bugs@lists.postgresql.org" Subject: Re: Re: BUG #15503: Bytea type column select failed when the length of the value is more than 512M References: <15503-0ea185f3f6ad9b99@postgresql.org>, <20181114075735.GE13659@paquier.xyz> X-Priority: 3 X-Has-Attach: no X-Mailer: Foxmail 7, 2, 7, 26[cn] MIME-Version: 1.0 Message-ID: <201811141604590662237@highgo.com> Content-Type: multipart/alternative; boundary="----=_001_NextPart020302718417_=----" X-Originating-IP: [192.168.100.145] X-ClientProxiedBy: EX02.highgo.com (192.168.110.195) To EX02.highgo.com (192.168.110.195) X-Host-Lookup-Failed: Reverse DNS lookup failed for 124.133.18.218 (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_001_NextPart020302718417_=---- Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: base64 Pk5vcGUuICBwYWxsb2MoKSBpcyBhYmxlIHRvIGFsbG9jYXRlIHVwIHRvIDFHQi4NCg0KVGhlIHNp emUgb2YgYnl0ZWEgaXMgNTEyTSxidXQgaW4gYnl0ZWFvdXQoKSBmdW5jdGlvbiwgaXQgZXhwZW5k IHRvIG1vcmUgdGhhbiAxRy4NCiMjIyMjIw0KcnAgPSByZXN1bHQgPSBwYWxsb2MoVkFSU0laRV9B TllfRVhIRFIodmxlbmEpICogMiArIDIgKyAxKTsNCiMjIyMjIw0KDQotLQ0KbGNoY2gNCiANCkZy b206IE1pY2hhZWwgUGFxdWllcg0KRGF0ZTogMjAxOC0xMS0xNCAxNTo1Nw0KVG86IGxpY2h1YW5j aGVuZ0BoaWdoZ28uY29tOyBwZ3NxbC1idWdzQGxpc3RzLnBvc3RncmVzcWwub3JnDQpTdWJqZWN0 OiBSZTogQlVHICMxNTUwMzogQnl0ZWEgdHlwZSBjb2x1bW4gc2VsZWN0IGZhaWxlZCB3aGVuIHRo ZSBsZW5ndGggb2YgdGhlIHZhbHVlIGlzIG1vcmUgdGhhbiA1MTJNDQpPbiBXZWQsIE5vdiAxNCwg MjAxOCBhdCAwNjoyMzoyMUFNICswMDAwLCBQRyBCdWcgcmVwb3J0aW5nIGZvcm0gd3JvdGU6DQo+ IGlzIGl0IGEgYnVnPw0KIA0KTm9wZS4gIHBhbGxvYygpIGlzIGFibGUgdG8gYWxsb2NhdGUgdXAg dG8gMUdCLg0KLS0NCk1pY2hhZWwNCg== ------=_001_NextPart020302718417_=---- Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable =0A
>Nope.  palloc() is able to allocate up t= o 1GB.

The size of bytea is 512M,but in byteaout() function, it expend to more than 1G= .
######
rp =3D result =3D p= alloc(VARSIZE_ANY_EXHDR(vlena) * 2 + 2 + 1);=
######

--
=0A
lchch=0A
 
From: = ;Michael Paquier
D= ate: 2018-11-14 15:57
To: lichuancheng@highgo.com; pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15503: Bytea type column select fai= led when the length of the value is more than 512M
<= div>On Wed, Nov 14, 2018 at 06:23:21AM +0000, PG Bug reporting form wrote:=
=0A
> is it a bug?
=0A
 
=0A
Nope.&nbs= p; palloc() is able to allocate up to 1GB.
=0A
--
=0A
Mi= chael
=0A
------=_001_NextPart020302718417_=------