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 1mf1L9-0003aq-HH for pgsql-bugs@arkaria.postgresql.org; Mon, 25 Oct 2021 14:52:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mf1L7-0002Wb-9z for pgsql-bugs@arkaria.postgresql.org; Mon, 25 Oct 2021 14:52:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <9erthalion6@gmail.com>) id 1mf1L7-0002WR-04 for pgsql-bugs@lists.postgresql.org; Mon, 25 Oct 2021 14:52:41 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <9erthalion6@gmail.com>) id 1mf1L3-0000pl-Ic for pgsql-bugs@lists.postgresql.org; Mon, 25 Oct 2021 14:52:40 +0000 Received: by mail-wr1-x436.google.com with SMTP id p14so7370033wrd.10 for ; Mon, 25 Oct 2021 07:52:37 -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=h+Jpiakm2NnCF60fMUjCfbErchUp653xMB0C/be9sBs=; b=VsNzokMJnwp9F7QcpBqzJftz0LaVzIMRZFqySIWVfvMFdyqKPYV8PildooVAqhaGOy hNfDOMzxVVtYC/SOTMJSZyiPeaz2oZ+ER3WNFmjKepYwkcY0ksk3SX3rAnyTYMFKGacD sMNf016y97y7r+Ir0YOHZfvzsAf8uBYc/SGp9UuQm3PzrC6zTihSgLepcaNxvw78P4p1 J9HbHiEvqSGh+c4FU17yCm7SdlYvjPMF4jdyampHH3OyZvVv13npF/QsvYpGTtNlve/X TIAG8TTlxrFTlm2iX5c0t2MHWi/qW7JidRVhetd/xrcMto4ozTYsFTn5cW7lEy40UCSi ywyg== 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=h+Jpiakm2NnCF60fMUjCfbErchUp653xMB0C/be9sBs=; b=w70blK+vS8DIHjgjAx0zBgH339dM3QTZUUqhdX0an34SUDB5KApoQjoZRBaQV7tdJt yb3WSqseV7FBEG2B/eVa1r9FySNowwoxYvMWyZESEcw/CuhEvcT5KquJngP0b15745+m +MgaH50mvgjeTCIzR7oDsdo90DNX9LJpYbwuzCoanmb0AM+GYQvW8woeBq3DzXoca1Sc sSLCaf+p/SYk3/mT76EOLRd9nbN9pNRGbH7enNc6gIT0OXk9ZzDPI+yHZP0qeeXnMcvE JoD4TaK1GNA1UsvZVbQFo7b1e5wbcFjK0kw7bW4OZKLsEJBrmZZMmSIrJdH4+9UCWEK9 43fA== X-Gm-Message-State: AOAM530y6GU+nu+UvAgP8JwG9+ojM8yMgPd75bIeqdJmz9s8d/fg9jl0 uUY92m150lPeHIb8gWYT6m7IfU6kaWA= X-Google-Smtp-Source: ABdhPJyCKfJTjo3P4jjQEAicBvGeToxt44gZXOu55urD6MTMd3EiU2G/8w92c5nDA6CSpdTeSXyb9A== X-Received: by 2002:a5d:59ae:: with SMTP id p14mr23927304wrr.76.1635173555928; Mon, 25 Oct 2021 07:52:35 -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 s8sm6770456wra.30.2021.10.25.07.52.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Oct 2021 07:52:35 -0700 (PDT) Date: Mon, 25 Oct 2021 16:53:07 +0200 From: Dmitry Dolgov <9erthalion6@gmail.com> To: Herman verschooten Cc: pgsql-bugs@lists.postgresql.org Subject: Re: ERROR: posting list tuple with 20 items cannot be split at offset 168 Message-ID: <20211025145307.zvnclgqhmum4x6et@localhost> References: <8CDB73C1-E3AF-40A6-BA81-8AFE174C6402@verschooten.net> <20211025114159.tfeirihcojzzcxed@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Mon, Oct 25, 2021 at 02:41:43PM +0200, Herman verschooten wrote: > I made a mistake apparently on checking the wrong thing. > someone on slack helped me. > > tranman_production=# SELECT bt_index_check(c.oid), c.relname, c.relpages > tranman_production-# FROM pg_index i > tranman_production-# JOIN pg_opclass op ON i.indclass[0] = op.oid > tranman_production-# JOIN pg_am am ON op.opcmethod = am.oid > tranman_production-# JOIN pg_class c ON i.indexrelid = c.oid > tranman_production-# JOIN pg_namespace n ON c.relnamespace = n.oid > tranman_production-# WHERE am.amname = 'btree' AND n.nspname = 'public' > tranman_production-# -- Don't check temp tables, which may be from another session: > tranman_production-# AND c.relpersistence != 't' > tranman_production-# -- Function may throw an error when this is omitted: > tranman_production-# AND i.indisready AND i.indisvalid > tranman_production-# ORDER BY c.relpages; > ERROR: item order invariant violated for index "index_products_on_group" > DETAIL: Lower index tid=(1,353) (points to heap tid=(19,8)) higher index tid=(1,354) (points to heap tid=(14,14)) page lsn=5/CEC25DA8. > tranman_production=# SELECT bt_index_check(c.oid), c.relname, c.relpages > FROM pg_index i > JOIN pg_opclass op ON i.indclass[0] = op.oid > JOIN pg_am am ON op.opcmethod = am.oid > JOIN pg_class c ON i.indexrelid = c.oid > JOIN pg_namespace n ON c.relnamespace = n.oid > WHERE am.amname = 'btree' AND n.nspname = 'public' > -- Don't check temp tables, which may be from another session: > AND c.relpersistence != 't' > -- Function may throw an error when this is omitted: > AND i.indisready AND i.indisvalid > ORDER BY c.relpages; > ERROR: item order invariant violated for index "index_products_on_group" > DETAIL: Lower index tid=(1,353) (points to heap tid=(19,8)) higher index tid=(1,354) (points to heap tid=(14,14)) page lsn=5/CEC25DA8. > > I dropped that index and ran it again, and kept on dropping indexes > > ERROR: item order invariant violated for index "index_cleanings_on_receipt" > DETAIL: Lower index tid=(39,21) (points to heap tid=(238,98)) higher index tid=(39,22) (points to heap tid=(243,7)) page lsn=1/B853F98. > > ERROR: item order invariant violated for index "index_freights_on_reference_4" > DETAIL: Lower index tid=(34,51) (points to heap tid=(67,7)) higher index tid=(34,52) (points to heap tid=(84,2)) page lsn=6/7EFB68. > > ERROR: item order invariant violated for index "index_freights_on_reference_3" > DETAIL: Lower index tid=(38,82) (points to heap tid=(362,75)) higher index tid=(38,83) (points to heap tid=(194,21)) page lsn=4/FEA79090. > > ERROR: item order invariant violated for index "index_freights_on_reference_2" > DETAIL: Lower index tid=(10,44) (points to heap tid=(176,26)) higher index tid=(10,45) (points to heap tid=(215,60)) page lsn=5/46A4D90. > > ERROR: item order invariant violated for index "index_freights_on_reference_1" > DETAIL: Lower index tid=(43,214) (points to heap tid=(112,46)) higher index tid=(43,215) (points to heap tid=(112,43)) page lsn=5/C3999990. > > > Now no more errors are displayed, and I can run my initial update again, with the index created. > > I recreated the 6 indexes and everyhting still works. > > Herman Does it mean that everything is fine after recreating index_freights_on_reference_ indexes? Well, that would mean they were somehow corrupted, and reindexing is the way to go. Although it's not clear for me, why the problem was temporarily avoided by dropping another index on cmr_received. PS: One small tip, please reply to all in the mailing list, otherwise it would be harder for others to understand what happened with the discussion.