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 1h2Yu4-0006ss-RZ for pgsql-bugs@arkaria.postgresql.org; Sat, 09 Mar 2019 10:08:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h2Yu3-0007tN-78 for pgsql-bugs@arkaria.postgresql.org; Sat, 09 Mar 2019 10:08:27 +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 1h2Yu2-0007tG-Ur for pgsql-bugs@lists.postgresql.org; Sat, 09 Mar 2019 10:08:27 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h2Ytw-0002wd-Cq for pgsql-bugs@lists.postgresql.org; Sat, 09 Mar 2019 10:08:26 +0000 Received: by mail-wr1-x42b.google.com with SMTP id t18so23898253wrx.2 for ; Sat, 09 Mar 2019 02:08:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=A7P/e7H/3mmr4O/Donl7q0CF31HR6rI797fdbRTgp7U=; b=liit+UXv4pG/xOpWhlFeQq+QysK/4pyvPhvCJBk8Veuc6z/kvRJWAKEDCvrkhM++ox FuPgfFQ/DHNb5XO1Np4r89GWdlT2n8NYqJHhoukTNAyt25e8m26HSdVrsvuIfDWc8mzz lYYih/oGyHhW45I7wM09JBGZ+u/uKLUpeR7ee8RRVrZuTpvc3M/B/TkH9QnITUm0VDYi JMH+Uu6JP5Ufz+d6QAaQCHeMqt8HQmRqPHKN+aCFCRG2YkzK1+xlApSmstU+O0knkn1x aI9r9jLIDDTnLzuNE0zROurtnnkJFuYVPLIYjUB2OEXHBaiYhj2Y5dGB04eyxJ2ixhUq 4d9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=A7P/e7H/3mmr4O/Donl7q0CF31HR6rI797fdbRTgp7U=; b=jDP2kf22uvnA6otKoebGUQcIlxI+czYAxX4tYBjsrCDQhnewhdAlRzgHjGuSCDtnPO LH33raamEfBBe8arUBdwU3FkwCUVxtCpF7QyhJjPz5vbkdXMuJv2bXq8exJ5kMV9Ji3Q jg+VxthNWaZyujrpA54XpI0AprrNyD5h8OJy2rRJw924bcm0MGekdmbkl5WQLgZpve3C KVwvqLSMAmXJTxL+OHolOplJwq3dIu4mJk93xWDNHWynBKgYYsD1y/z8JEmjNFeYfql3 gMrT6KpNjFrlOZH+WfzWRfGfSiNltSegacTyo4rQrarSMMXP3er3odHESaZ+1xtzstWW d0Yw== X-Gm-Message-State: APjAAAWpjAeNJy+b2wSTL7LGzATOOTirKgUss0B09RxzPieW9VQd1Q6O n6KW8gxin0/hCrgMDQ8OVzy3S64j X-Google-Smtp-Source: APXvYqzODs3FGGUDJfXZapz2xF4y8STtkWEgzLbQNgz87BNYJJgc2WxmMdGeJFCzDhXrg3ACkL1lLQ== X-Received: by 2002:adf:9d85:: with SMTP id p5mr13854575wre.215.1552126098455; Sat, 09 Mar 2019 02:08:18 -0800 (PST) Received: from [192.168.0.10] ([95.180.47.253]) by smtp.gmail.com with ESMTPSA id p10sm644757wrs.5.2019.03.09.02.08.17 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Sat, 09 Mar 2019 02:08:17 -0800 (PST) Subject: Re: BUG #15653: pg_detoast_datum_packed problem To: Andrew Gierth Cc: pgsql-bugs@lists.postgresql.org References: <15653-a9979a97bd11577d@postgresql.org> <8a0d54a5-1c94-aa00-7e22-7d16566839b4@gmail.com> <13b4fc8a-b790-ddec-bf02-fe99ed793a5b@gmail.com> <87a7i5b2ok.fsf@news-spur.riddles.org.uk> <5236e747-2107-35f8-6741-99298f0bd6a4@gmail.com> <87r2bg9yb2.fsf@news-spur.riddles.org.uk> From: =?UTF-8?Q?gmail_Vladimir_Kokovi=c4=87?= Message-ID: Date: Sat, 9 Mar 2019 11:08:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.2 MIME-Version: 1.0 In-Reply-To: <87r2bg9yb2.fsf@news-spur.riddles.org.uk> Content-Type: multipart/alternative; boundary="------------54E5F1289DBF690AFFAEED81" Content-Language: en-GB List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------54E5F1289DBF690AFFAEED81 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hi Andrew, You are absolutely right and "select ", OID from ispp_wmpl where (bvarchar (key))> = (bvarchar ('W' :: varchar)) and (bvarchar (key)) <= (bvarchar ~~~~~~~~ ':: varchar)) order by key" has passed! However, pg log file now has hundreds of warning message: 2019-03-09 10:53:29 CET ispp-pionir-test :: 1 (53858) 14721 0 01000 WARNING: problem in allocation set ExprContext: detected write past chunk end block 0x55ccb0b36468, chunk 0x55ccb0b36490 2019-03-09 10:53:29 CET ispp-pionir-test :: 1 (53858) 14721 0 01000 WARNING: problem in allocation set ExprContext: detected write past chunk end in block 0x55ccb0b36468, chunk 0x55ccb0b36490 2019-03-09 10:53:29 CET ispp-pionir-test :: 1 (53858) 14721 0 01000 WARNING: problem in allocation set ExprContext: detected write past chunk end in block 0x55ccb0b36468, chunk 0x55ccb0b36490 ... Andrew, I have to thank you for this help because without this, my 'select' would never have passed. Vladimir Koković, DP senior(69) Belgrade, Mar. 9 2019 On 9.3.19. 10:48, Andrew Gierth wrote: >>>>>> "gmail" == gmail Vladimir Koković writes: > gmail> Hi Andrew. > gmail> I changed VARSIZE to VARSIZE_ANY_EXHDR and VARDATA in > gmail> VARDATA_ANY as you said, but there is still a problem I can not > gmail> understand ! > > Your message formatting was all messed up, but I can see that you are > still subtracting VARHDRSZ - don't do that: VARSIZE_ANY_EXHDR already > has the header size subtracted (hence "EXHDR"), it returns only the data > size. (The header size is variable, 1 or 4 bytes, so it wouldn't make > sense to include it.) > --------------54E5F1289DBF690AFFAEED81 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Hi Andrew,

You are absolutely right and "select ", OID from ispp_wmpl where (bvarchar (key))> = (bvarchar ('W' :: varchar)) and (bvarchar (key)) <= (bvarchar ~~~~~~~~ ':: varchar)) order by key" has passed!

However, pg log file now has hundreds of warning message:
2019-03-09 10:53:29 CET ispp-pionir-test :: 1 (53858) 14721 0 01000 WARNING: problem in allocation set ExprContext: detected write past chunk end block 0x55ccb0b36468, chunk 0x55ccb0b36490
2019-03-09 10:53:29 CET ispp-pionir-test :: 1 (53858) 14721 0 01000 WARNING: problem in allocation set ExprContext: detected write past chunk end in block 0x55ccb0b36468, chunk 0x55ccb0b36490
2019-03-09 10:53:29 CET ispp-pionir-test :: 1 (53858) 14721 0 01000 WARNING: problem in allocation set ExprContext: detected write past chunk end in block 0x55ccb0b36468, chunk 0x55ccb0b36490 
...
Andrew, I have to thank you for this help because without this, my 'select' would never have passed.


Vladimir Koković, DP senior(69)
Belgrade, Mar. 9 2019

On 9.3.19. 10:48, Andrew Gierth wrote:
"gmail" == gmail Vladimir Koković <vladimir.kokovic@gmail.com> writes:
 gmail> Hi Andrew.
 gmail> I changed VARSIZE to VARSIZE_ANY_EXHDR and VARDATA in
 gmail> VARDATA_ANY as you said, but there is still a problem I can not
 gmail> understand !

Your message formatting was all messed up, but I can see that you are
still subtracting VARHDRSZ - don't do that: VARSIZE_ANY_EXHDR already
has the header size subtracted (hence "EXHDR"), it returns only the data
size. (The header size is variable, 1 or 4 bytes, so it wouldn't make
sense to include it.)

--------------54E5F1289DBF690AFFAEED81--