Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wfMDk-005PU9-2G for pgsql-bugs@arkaria.postgresql.org; Thu, 02 Jul 2026 18:33:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wfMDj-002lRI-0v for pgsql-bugs@arkaria.postgresql.org; Thu, 02 Jul 2026 18:33:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wfMDi-002lRA-2x for pgsql-bugs@lists.postgresql.org; Thu, 02 Jul 2026 18:33:07 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wfMDg-00000001OS6-27Il for pgsql-bugs@lists.postgresql.org; Thu, 02 Jul 2026 18:33:06 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-461edb387ddso2100468f8f.3 for ; Thu, 02 Jul 2026 11:32:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1783017178; cv=none; d=google.com; s=arc-20260327; b=RqZX3f7mNMPCZV64jAlYlhAAhPUpYbiMexL5z3fGfCUhRFG+aBFgtPmxL1JoiJpOZG oKzFStS5MrnQ4epZ4oBvAI7nDxhF+Kh2Q1YUNf+hIQDW7a6jugOiwgrII7FLpVxBHtpD /LeKfjyxsCSeetiD2XqvEOubsd/evGHhkZxBjxxJwdVv12UVicN8yhcih8/Z1ZpiELWZ uJ/OGFaYOEVeZKzUHqIpKI/YxiBxIGDysggmeSmAR/VsmhFApZY/nRVyQtTlWw0WbIeK Z/tZgUed1nP/wmzKjTW+8Ee+jE06q6VhI4uLZ0+N1eftsH31MIZLgiRdec+R4yu43COP eHPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=q6ZxjrRqqMEMLmFn37CwsDx5yoDuBiQdCHUUQm+iuPQ=; fh=6nwfxbWD/FCGUZc1OnG93AJZaHCQfpQx7k1VC6BMcwo=; b=eoM9DhKLWvF22tbQL0ZWKF4TNoDM2Eda9uzeDqHUurMEBg5rSc/PcR823ly/iXjj1g IV8SHToXWQ3PkqEA88cEapjX1VBim1o7inAnf7RFUCiBtWQomILLAn8/997J4PUYnb7l ZiL7I1sdWW8QUKa5Nj6u2ZDNACuUycx1c/uNezUEHHAPkgk4k9C6MGW2P6e9Ad5nuRx6 LjWiUmgTz29I2Ve1GsrawVuVyfQ7Jh4YcULoGQejIA6098kXhkKLd5rESJwq5vPehRap IgGVQ4yQxqeQ0klliwI6mKX+gKbrpwbY6CbfYah1VGhgU8Es8UQ8MYJOV2UekAOPVw57 mNYg==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bowt-ie.20251104.gappssmtp.com; s=20251104; t=1783017178; x=1783621978; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=q6ZxjrRqqMEMLmFn37CwsDx5yoDuBiQdCHUUQm+iuPQ=; b=YBpHwhB2qOGKzEdzQU1aQKXeihrlaO/kR0kggxFtFfxQXN9/k0G/P3v4UVyLqtUJJ5 KRehsIXRACnPxOhu3w//ZMzyY83e+t+9ACcx93ya6Ss6/h1Blm0/xcC1wHpoQ+Gzcc1W vs3xHpPDboRPvfehkWNbN4OB/m7x21D3s9fnJDPlq/VaOcq000bIGEmGLB0qNsykkzXL YBQdrGpYKeys/LTLceMBNQ3edtgZbPa5FASE878FdUUvn2qTyRofomhhEPYvixjBsqcE Rlxbx1q9mgt8h5sK0hWL755DZQgalT6pWmkiACxhA3pHHxOccEECdE4KGTM+c1Ue9DjQ W6iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783017178; x=1783621978; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=q6ZxjrRqqMEMLmFn37CwsDx5yoDuBiQdCHUUQm+iuPQ=; b=piTvSdL4KHDSbg0Z9FGn+G7+hd4letYlEngRU+1wbHR3f0a8Huv0i4OfyHGyEg0lcE rbCmtpz/5xKI5DAhgQdziWcjqnOGlM3n2teqALqrdyzUiDExLZ2ogOVpodEva+0nbDDQ VnyHAMfbm+4sy/ebDByIgi6QnKAkrv/xfU0ViFbCkrDlXer/ikzxCKjCNeqCBJ0DU18r 6s5YBPNQm2otZLJzFsX9/CZRrgLKUBB15YwbXr6IpNDWZBqYRkwTqZhAms/vppXq89NT lDAPDguP8DjARXiv5z1cgbjKmClzTf7myE53PpD3MpsPWOWDCseot8fmdDWFaxvNCwYc zVwQ== X-Gm-Message-State: AOJu0YxIJBJrukRFzThnagkIfIjDI1E5iY+B8UHd22uO7zDwUczwM1B2 uowtFTvCMm6G7FEgj4nVYD1d3bZYMGf+qczZeemDygyALd3LKZtcUygmf3j1BFdeLgShppMYErV FBT1BnjW4oDXGhyHxk3jxwI7bZzZxcmTz2WMH8kfUZuV9JPEh5BRWd8sc0g== X-Gm-Gg: AfdE7cmksgqyxVFr/NJfOlw+8uuRwkCX7Q+1eh/dnQF5F+gS1NFwaXO+KiFz75pEDc7 ze3wzulpK0tsZL09r9AxlokanycM6rvo/1SO5g4m31MlTe+WnaPBsUyjQ6Ol7vorgWzdbqTxRIy TgXRYvUHFNux4ez6HiIInokZ6ifc7j72ZKVO+vWvJ7EZIptt//LfIMQk240K7p1hQTSt3HBZWtY z48ceI2DU28z3SACtvrY5cQNTBqnGNJKTRv278KFhUOB1/CoeC/EqHduS61thf0suDoFRXFvUDP jvuNajrSz6hx8MqhB9DHTVwflvPXKQ3HQ2cFQT81g/JmhtD2aI4lTA== X-Received: by 2002:a05:6000:27d3:b0:475:ba80:b657 with SMTP id ffacd0b85a97d-477aeb5d587mr7450560f8f.3.1783017177860; Thu, 02 Jul 2026 11:32:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Peter Geoghegan Date: Thu, 2 Jul 2026 14:32:31 -0400 X-Gm-Features: AVVi8CfShYVnMJIBuTOQlxSLzEn6jfTb3FuB9D7uFiKC-rFepIHHilAkxWYt9pw Message-ID: Subject: Re: BTree index corruption (heap-tid-past-end, unexpected zero page, misplaced TID in posting list) recurring on high-churn tables, PG 18.3, data_checksums=on, no preceding crash To: alessandro@regolini.it Cc: pgsql-bugs@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Jul 2, 2026 at 2:25=E2=80=AFPM Alessandro Regolini wrote: > What we can provide on the next occurrence > ------------------------------------------ > We run a periodic amcheck sweep, so we usually catch a fresh case before > reindexing. Before REINDEX we can capture, for the affected block: > - contrib/pageinspect: bt_page_items() of the index block and > heap_page_items() / page_header() of the referenced heap block > - full bt_index_check / bt_index_parent_check output > - verify_heapam() of the underlying table > Please tell us which dumps would be most useful to root-cause this (btree > deduplication / VACUUM interaction is our current suspicion). Those all seem useful, but I doubt that bt_index_parent_check is going to add much over bt_index_check. However, you should be sure to run bt_index_check with heapallindexed=3Dtrue, which will verify agreement between the index and the underlying table. If you see a heapallindexed=3Dtrue failure, getting page images for the pointed-to heap page is useful (as well as the index page). I prefer a raw dump of the page itself over a textual representation. See the procedure here: https://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_Postgre= SQL_backend_on_Linux/BSD#contrib/pageinspect_page_dump --=20 Peter Geoghegan