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 1meyMC-0005KM-Ld for pgsql-bugs@arkaria.postgresql.org; Mon, 25 Oct 2021 11:41:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1meyMA-0006gp-5u for pgsql-bugs@arkaria.postgresql.org; Mon, 25 Oct 2021 11:41:34 +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 <9erthalion6@gmail.com>) id 1meyM9-0006gg-SS for pgsql-bugs@lists.postgresql.org; Mon, 25 Oct 2021 11:41:33 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <9erthalion6@gmail.com>) id 1meyM6-0000GA-8t for pgsql-bugs@lists.postgresql.org; Mon, 25 Oct 2021 11:41:33 +0000 Received: by mail-wr1-x42c.google.com with SMTP id z14so11153341wrg.6 for ; Mon, 25 Oct 2021 04:41:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=buyD4qXYS6sZxWushMLxjkokqMzkR4MQdU4g1XSJxRc=; b=Zfa+RjW9Y3lFRAsod0s4AL8a1X2PnjHIGblu18nshi9mZD1Hv5eBB2nxGwrbuGLbel cLvNb/H7xJTijwdAfm7mD90vS3QBTKFuPQEneRQE0U3JQcnOZMchDjgw8mC2v2ScdIBD uNoqkiLZXHigjBDpklB/hmNeYJtLA6XO2d4wzAWt30hkjFjjo07qO0raDuzxKmsE5hV/ sTfhpY9E3xmoArvtOrCyBWmeBR5mUDxunIFYCbRifcUm4sT1HcEtc1tZXhVMsr2UL+jt fm6zWPJFTeDL4j2kcCISrD+8taQoGOE1cCr7UPSDAHxHropMj5OofPAZh8C6HX9wCzEd RGQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=buyD4qXYS6sZxWushMLxjkokqMzkR4MQdU4g1XSJxRc=; b=nMZtP6+qxUK4U5lFk1j1DW8ofqrknql2AjcwVvzHm+sU14Fp28EwqOnXviNQmHbs+g 4cVGEUfj4woaFRrRm+1UYXlDDqwlzfCYT0JwJj+FVSsv3ja2ix/WNp47YOei+PlhMW6x B1ls8uqOU4zOQX5vutDvXNsWZfr5bEt7Q+P4ZmWdWM1RYnO7kbugk4lk0QlKg+KaUkbI nqUzkjohjk3zBI86s4UDa/XH8eR3p9QALo4D/DvrHwv4kUgwSvizaq2Zle8ycpdd/s4Q vZrP5/PXph4movIsUW2xhIJ2PlN788vR1X/oTH2xfbcF3LThPnTwZJtL3eYp1mVO3HIN 0yOQ== X-Gm-Message-State: AOAM533hQFg+Invda16Dhvp8pQJdUO7NyjjImACwuA2TqK3/xj8z5cDA JiXC3wXeD7hJhHWW9I8ryBI= X-Google-Smtp-Source: ABdhPJz6VIZMdvgJERADUuEErzU/lrUvtkzxfEX8pSGSEDyrWD3FNKKXSN1Jlv67ZTR5yvkCrFGqkw== X-Received: by 2002:adf:ef8f:: with SMTP id d15mr22810515wro.72.1635162088877; Mon, 25 Oct 2021 04:41:28 -0700 (PDT) Received: from localhost (dslb-094-222-009-006.094.222.pools.vodafone-ip.de. [94.222.9.6]) by smtp.gmail.com with ESMTPSA id f24sm15461064wmb.33.2021.10.25.04.41.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Oct 2021 04:41:28 -0700 (PDT) Date: Mon, 25 Oct 2021 13:41:59 +0200 From: Dmitry Dolgov <9erthalion6@gmail.com> To: Herman verschooten Cc: pgsql-bugs@lists.postgresql.org, Christl Nagels Subject: Re: ERROR: posting list tuple with 20 items cannot be split at offset 168 Message-ID: <20211025114159.tfeirihcojzzcxed@localhost> References: <8CDB73C1-E3AF-40A6-BA81-8AFE174C6402@verschooten.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8CDB73C1-E3AF-40A6-BA81-8AFE174C6402@verschooten.net> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Mon, Oct 25, 2021 at 11:58:48AM +0200, Herman verschooten wrote: > Hi, > > I upgraded postgres 13 to 14+231.pgdg18.04+1 during the weekend, virtual ubuntu 20.04.3. > > this morning a user reported an error when trying to change a flag in our web app (Phoenix, ecto). > I traced it back to an index issue on a boolean column. Hi, thanks for reporting the issue. > tranman_production=# update freights set cmr_received=false where id=49632; > ERROR: XX000: posting list tuple with 20 items cannot be split at offset 168 > LOCATION: _bt_swap_posting, nbtdedup.c:1037 > > If I drop the index index_freights_on_cmr_received, then the update succeeds. > > If I recreate the index, the error resurfaces. > > Note that it does not happen for every row in the database. Interesting, during posting list split the postingoff is bigger than the number of elements in the posting list. Have you tried to run amcheck [1] on this index? As in the neighbour thread probably heapallindexed is important, as the index recreation doesn't help. Otherwise, is there a chance to use pageinspect [2] to take a look at the structure if the index? [1]: https://www.postgresql.org/docs/13/amcheck.html [2]: https://www.postgresql.org/docs/13/pageinspect.html