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 1wEvEF-004ZBN-00 for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Apr 2026 20:28:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wEvEC-004V8I-36 for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Apr 2026 20:28:20 +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 1wEvEC-004V87-1w for pgsql-hackers@lists.postgresql.org; Mon, 20 Apr 2026 20:28:20 +0000 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wEvE9-00000002BcM-49ZJ for pgsql-hackers@lists.postgresql.org; Mon, 20 Apr 2026 20:28:19 +0000 Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-671c5eb7fb0so4391271a12.3 for ; Mon, 20 Apr 2026 13:28:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776716897; cv=none; d=google.com; s=arc-20240605; b=UUu1AU1RvHBNcdQx0Pbajf46OzZ7jl4JS1AJr1z5XFr/17rg/BMCj1117VbBd5IMUv z8yNXLH6d8ppeFw2kcTu4RdnAkn8kcrWAZ/f/X0cXf+JhNMkHkTFfhLZUdszXbrEnGrJ WXdU/gxjqwE+1B1vgf0szW2bgfAQOaFdsaK5wXsOeOMlJ/1iDDwEUzD4WLOXYu8pIKCc jxNWkaGxk3apa5m/P9FUEaclKcH4SG0khuaN2TWRDKFL9c3st+sNL2yiYhZ1tgFACBTh 1xaaShEBL3Lrlo0EfseoZvKwoDGDE/bSV6QkyFGJuHWeeV/MB6IXOqPVf3Hkq5XfWBrY Sqkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=TKc4/M5lgEE/hLjvicHGgFRHKdw650Slhr2kjpKmdSs=; fh=qk/Z6Bh6EY0/Y7Iu30Ff9tCtMvFcCEGgYtF0BhbCtYs=; b=HHHK8QFivQIIsZwi8NCrhLO0Vncr3ZkKVJ7IwiPWFydMjzYnO9KZEpVFDMyMwrU1Up Ne92ITHHJeYK+xHbgplSyvwNCpYxCIslQ0ZhaR3HYAmS9nci+2vghLGa/LnfoBHLJlDx A9Wu8sfvg1NijQcGWATv0awuB9be/99yYXnIogWE93IvZuhDtbeil4uOxXdPgays4xru alUqwUGT6YnvVh6AcUemSEtljVRM45I/XiNrEH4SwfTAOox0Qgk2pOoFGQC2S54Z84sh OObYFU4aeeXvuS7zdEuLC18YbFvIp6jIsX+Ft+1Rnv+HKzxFj7jYUy8QcEI0P6i4Q3OP 8Ihg==; 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=gmail.com; s=20251104; t=1776716897; x=1777321697; 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=TKc4/M5lgEE/hLjvicHGgFRHKdw650Slhr2kjpKmdSs=; b=hxNTfWsSjOsk836U4+LWJh8rXvmEFZMT3AxCl8OweUw3ICc2t4edwdLV6nbtSyZ5Ih 2ummKi4OIhSiGW28Hzcbxz/XefNa2yehjDbXGKUE3HKKSsdhrJAqBUH33YLJUmx9gylr K4MAsVzE79X597+qxvOcrbbvIhPi3WtXwz2O6Vdm5DMnly6oua8L5BBrf2iyshgSM3m1 BDf0rvBst7L8WmQRJdD1q9pypABs90NyCJGZKEeY38XX9tNA4w9esd9Wj+1Pb/g//LRL DDD4Azg5fC5oETNvzE0Iq41VjhnUdwujt0y38/E3VOyuzenuvEcLQzk+0OL86OY/y83F Upyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776716897; x=1777321697; 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=TKc4/M5lgEE/hLjvicHGgFRHKdw650Slhr2kjpKmdSs=; b=Dhc06AqW4N/XjNWLG1RodMO5iWz7csaBEc06jm01v09QpBc8Di4m87U58HzdYmFqBe TCdAuT8hXjB53QWPeeR++Wt7+3YkLdj90mgy/3hOoBKx+G4SWuoIvGwKvsYX92r2j2uS yISkatw5L/14XV0p5y4uxLT2mbYAaGicF38r1lLAbrDDtPiQpBr/pLkmuANTbBTJNGFh GI4Ihy9LbCLi4gTxI2riMOiw69X3C2h1YmkyB828xGo9h+oau9CPtmAMJ5ZQjHQWq2Ii hNgmPgKcbjC0Q6IYV+p10dGqf4UuXhb7ixgV2JBMA5xV71jbp6iqJ1BjAdTuXCt/hixa j/rA== X-Forwarded-Encrypted: i=1; AFNElJ/kmp1/9Dv0Z1p+XoTwa4KfbRhHMPXZfcCRf76Gljohe3ZUulI6wf9HdpplnquNNTnYnJYaUz8p+hgIyP59@lists.postgresql.org X-Gm-Message-State: AOJu0YwqJnTU7eOYWS0TDWvpVAtZEccyKTAKt/qHOLZKyeouRasFRnas eFonf8NSDl9nPSvNXSUchXLSCItKzPwP5lJGudkNOfMLkAhByc4W4s9HHj7IiDFKg16koiYASzs jE6b9e6rNkf8HSK8sBTMRtT6S5OQ1LaE= X-Gm-Gg: AeBDietSfSMEl7L+cRBA1A6sye+PHigjXnESB3MpQ7slTqSBRL2+X1uo0r96epXYTiQ /+Yh7zlkiiwt5no0wTLoCtmeBbraV94h1oB5VSAxBAp4bWdu2X1NbSSySNa2+EeFZ+3FUXRNRg3 C8DnLB+5BRGmtvg/2XbD7MtNbXUbwlI1p7HM/jJwVnuo5khnlPiDHUJ9zFtfjJUDvCo/fE4mbSp gNKqak1UJgkOzrN67GV/hakzAoRMo/1bGRNXZ6bs1RuZ17kP3kCPBFu4SnbyPmhAH7nhRu1iaxq juUMoUiiN/JK6IgGH1WviA0x6moAJ9fbivxXxOg6wwccNmUZyRszR/8eSS5uOxMD99C72V/kKbp szjVhs7XHodlpF1zmqZ4= X-Received: by 2002:a05:6402:440f:b0:670:f319:ae77 with SMTP id 4fb4d7f45d1cf-672bfd740a9mr6748506a12.1.1776716895212; Mon, 20 Apr 2026 13:28:15 -0700 (PDT) MIME-Version: 1.0 References: <2be31f17-5405-4de9-8d73-90ebc322f7d8@vondra.me> <97529f5a-ec10-46b1-ab50-4653126c6889@gmail.com> <46733d68-aec0-4d09-8120-4c66b87047a4@gmail.com> <71277259-264e-4983-a201-938b404049d7@gmail.com> In-Reply-To: <71277259-264e-4983-a201-938b404049d7@gmail.com> From: Melanie Plageman Date: Mon, 20 Apr 2026 16:28:03 -0400 X-Gm-Features: AQROBzDd7ZStdIR20oGzHN3b32MPtBJqMP80B0OGaH77d3Xnm3TiAtZ7YdGSRhA Message-ID: Subject: Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access) To: Alexander Lakhin Cc: Andres Freund , Tomas Vondra , David Rowley , Kirill Reshke , Chao Li , Andrey Borodin , Xuneng Zhou , Robert Haas , PostgreSQL Hackers , Heikki Linnakangas 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 Mon, Apr 20, 2026 at 3:00=E2=80=AFPM Alexander Lakhin wrote: > > I think, I found another test which suffers from autoanalyze with the new > behavior: [1], [2]. Thanks for continuing to look for these! > Initially I reproduced this diff on a slow armv7 device after many > iterations of `make check` with: > autovacuum_naptime =3D 1 > autovacuum_analyze_threshold =3D 1 > debug_parallel_query =3D 'regress' > > But now I see that it can be reproduced on an ordinary machine with just: > --- a/src/test/regress/sql/plancache.sql > +++ b/src/test/regress/sql/plancache.sql > @@ -208,2 +208,3 @@ execute test_mode_pp(1); -- 2x > execute test_mode_pp(1); -- 3x > +analyze test_mode; > execute test_mode_pp(1); -- 4x > (and expected/plancache.out updated) > > and `make check` running in a loop. It failed for me on iterations 5, 4, > 10 (as far as I can see, analyze updates relallvisible not every time): If you do vacuum test_mode instead, it should fail reliably. I think we can avoid having relallvisible updated by doing two things: 1) moving the analyze test_mode above the create index because the create index will scan the table and could set pages all-visible and then the analyze may update the statistics 2) create the table with autovacuum_enabled =3D false to avoid vacuum and analyze running after any of the other table scans may set some pages all-visible - Melanie